From e247ec47b75d45d16298e4e11ba68745b9ebe3eb Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 20 Apr 2017 21:41:36 -0700 Subject: 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 Reviewed-by: Tom Sepez --- core/fpdftext/cpdf_textpagefind.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'core/fpdftext') 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; } -- cgit v1.2.3