summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpagefind.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-20 21:41:36 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-21 04:53:07 +0000
commite247ec47b75d45d16298e4e11ba68745b9ebe3eb (patch)
treee121024f171c04c928459b258b8cae1c1b9d0b56 /core/fpdftext/cpdf_textpagefind.cpp
parent1badb85e5c3a4b4cd42ca1a2b223d6b3bc67cc4a (diff)
downloadpdfium-e247ec47b75d45d16298e4e11ba68745b9ebe3eb.tar.xz
Replace FXSYS_iswdigit with std::iswdigit.
Replace other one-off implementations as well. Change-Id: I2878f3fae479c12b7de5234ee3a26477d602d14d Reviewed-on: https://pdfium-review.googlesource.com/4398 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpagefind.cpp')
-rw-r--r--core/fpdftext/cpdf_textpagefind.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index 7eaac35194..a4f4a6e828 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -348,15 +348,10 @@ bool CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText,
return false;
}
if (char_count > 0) {
- if (csPageText.GetAt(startPos) >= L'0' &&
- csPageText.GetAt(startPos) <= L'9' && char_left >= L'0' &&
- char_left <= L'9') {
+ if (std::iswdigit(char_left) && std::iswdigit(csPageText.GetAt(startPos)))
return false;
- }
- if (csPageText.GetAt(endPos) >= L'0' && csPageText.GetAt(endPos) <= L'9' &&
- char_right >= L'0' && char_right <= L'9') {
+ if (std::iswdigit(char_right) && std::iswdigit(csPageText.GetAt(endPos)))
return false;
- }
}
return true;
}