summaryrefslogtreecommitdiff
path: root/core/src/fpdftext
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-02 10:29:50 -0700
committerLei Zhang <thestig@chromium.org>2015-10-02 10:29:50 -0700
commitdcfa0ba2928072c962fe8835d1a2ccd309eafbbd (patch)
tree114f50642abd278f31ff677b8c30357933fa01d6 /core/src/fpdftext
parent095a83c59120c108d9ac6f0ab71fd3faa5eea810 (diff)
downloadpdfium-dcfa0ba2928072c962fe8835d1a2ccd309eafbbd.tar.xz
Turn a couple functions that always return true to return void.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1386463003 .
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp13
-rw-r--r--core/src/fpdftext/text_int.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index b81d967776..906554dde2 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -2574,9 +2574,7 @@ void CPDF_LinkExtract::ParseLink() {
}
if (nCount > 5 &&
(CheckWebLink(strBeCheck) || CheckMailLink(strBeCheck))) {
- if (!AppendToLinkList(start, nCount, strBeCheck)) {
- break;
- }
+ AppendToLinkList(start, nCount, strBeCheck);
}
}
start = ++pos;
@@ -2690,16 +2688,17 @@ FX_BOOL CPDF_LinkExtract::CheckMailLink(CFX_WideString& str) {
}
return TRUE;
}
-FX_BOOL CPDF_LinkExtract::AppendToLinkList(int start,
- int count,
- const CFX_WideString& strUrl) {
+
+void CPDF_LinkExtract::AppendToLinkList(int start,
+ int count,
+ const CFX_WideString& strUrl) {
CPDF_LinkExt* linkInfo = new CPDF_LinkExt;
linkInfo->m_strUrl = strUrl;
linkInfo->m_Start = start;
linkInfo->m_Count = count;
m_LinkList.Add(linkInfo);
- return TRUE;
}
+
CFX_WideString CPDF_LinkExtract::GetURL(int index) const {
if (!m_bIsParsed || index < 0 || index >= m_LinkList.GetSize()) {
return L"";
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index 0b3b9c8ae0..0efe805f26 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -227,7 +227,7 @@ class CPDF_LinkExtract : public IPDF_LinkExtract {
void DeleteLinkList();
FX_BOOL CheckWebLink(CFX_WideString& strBeCheck);
FX_BOOL CheckMailLink(CFX_WideString& str);
- FX_BOOL AppendToLinkList(int start, int count, const CFX_WideString& strUrl);
+ void AppendToLinkList(int start, int count, const CFX_WideString& strUrl);
private:
LINK_InfoArray m_LinkList;