diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-03-12 15:20:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-12 15:20:04 +0000 |
commit | 15c0fccfeff5bf389b494a828c89adb3207c73d6 (patch) | |
tree | 3b1f4691759b4e4e45d49a2d48f4548ad16a224c /core/fpdftext | |
parent | c2df008640f56631735dd3ae89e118c9c56cd36d (diff) | |
download | pdfium-15c0fccfeff5bf389b494a828c89adb3207c73d6.tar.xz |
Remove all usages of FXSYS_iswASCIIalnum
Instances are either replaced with FXSYS_iswalnum, which calls out to
the ICU library to do the proper Unicode operations, or have been
converted to a isascii && isalnum pair, if ASCII alnum is actually
what was wanted.
BUG=pdfium:1035
Change-Id: I959ec8739a4d020e61562180393ab8113a81577c
Reviewed-on: https://pdfium-review.googlesource.com/28430
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdftext')
-rw-r--r-- | core/fpdftext/cpdf_linkextract.cpp | 4 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpage.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_linkextract.cpp b/core/fpdftext/cpdf_linkextract.cpp index f8144a171b..c3cf4fc1ef 100644 --- a/core/fpdftext/cpdf_linkextract.cpp +++ b/core/fpdftext/cpdf_linkextract.cpp @@ -246,7 +246,7 @@ bool CPDF_LinkExtract::CheckMailLink(WideString* str) { size_t pPos = aPos.value(); // Used to track the position of '@' or '.'. for (size_t i = aPos.value(); i > 0; i--) { wchar_t ch = (*str)[i - 1]; - if (ch == L'_' || ch == L'-' || FXSYS_iswASCIIalnum(ch)) + if (ch == L'_' || ch == L'-' || FXSYS_iswalnum(ch)) continue; if (ch != L'.' || i == pPos || i == 1) { @@ -282,7 +282,7 @@ bool CPDF_LinkExtract::CheckMailLink(WideString* str) { pPos = 0; // Used to track the position of '.'. for (size_t i = aPos.value() + 1; i < nLen; i++) { wchar_t wch = (*str)[i]; - if (wch == L'-' || FXSYS_iswASCIIalnum(wch)) + if (wch == L'-' || FXSYS_iswalnum(wch)) continue; if (wch != L'.' || i == pPos + 1) { diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index 5019eabaf5..7541dae6a7 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -1210,7 +1210,7 @@ bool CPDF_TextPage::IsHyphen(wchar_t curChar) const { if ((iter + 1) != curText.rend()) { iter++; - if (FXSYS_iswASCIIalpha(*iter) && FXSYS_iswASCIIalnum(curChar)) + if (FXSYS_iswASCIIalpha(*iter) && FXSYS_iswalnum(curChar)) return true; } |