From 15c0fccfeff5bf389b494a828c89adb3207c73d6 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 12 Mar 2018 15:20:04 +0000 Subject: 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 Commit-Queue: Ryan Harrison --- core/fxcrt/fx_extension.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/fx_extension.h') diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h index 491d4b29b7..bd0ac8b303 100644 --- a/core/fxcrt/fx_extension.h +++ b/core/fxcrt/fx_extension.h @@ -12,6 +12,7 @@ #include #include "core/fxcrt/fx_string.h" +#include "third_party/icu/source/common/unicode/uchar.h" #define FX_INVALID_OFFSET static_cast(-1) @@ -45,8 +46,8 @@ inline bool FXSYS_iswASCIIalpha(wchar_t wch) { return FXSYS_isASCIIupper(wch) || FXSYS_isASCIIlower(wch); } -inline bool FXSYS_iswASCIIalnum(wchar_t wch) { - return FXSYS_iswASCIIalpha(wch) || std::iswdigit(wch); +inline bool FXSYS_iswalnum(wchar_t c) { + return u_isalnum(c); } inline bool FXSYS_iswASCIIspace(wchar_t c) { -- cgit v1.2.3