diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-03 13:39:26 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-03 17:56:23 +0000 |
commit | 72c6b181862ada8adf485ab8015120df32d9f600 (patch) | |
tree | b047021e787f77a1835edbbf3201322696106ddf /core/fxcrt/fx_ext.h | |
parent | 192e4d969f918e1ec1e79094b6af0235d7be4818 (diff) | |
download | pdfium-72c6b181862ada8adf485ab8015120df32d9f600.tar.xz |
Minor cleanups
Cleanup some unused methods, add some missing #ifdef comments.
Bug: pdfium:694
Change-Id: I019a03f7a55d1d4a23300ff822ae30dde4406c3d
Reviewed-on: https://pdfium-review.googlesource.com/3596
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_ext.h')
-rw-r--r-- | core/fxcrt/fx_ext.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/fxcrt/fx_ext.h b/core/fxcrt/fx_ext.h index e605d04077..2eafe6c7b9 100644 --- a/core/fxcrt/fx_ext.h +++ b/core/fxcrt/fx_ext.h @@ -16,7 +16,6 @@ #define FX_INVALID_OFFSET static_cast<uint32_t>(-1) float FXSYS_tan(float a); -float FXSYS_logb(float b, float x); float FXSYS_strtof(const char* pcsStr, int32_t iLength = -1, int32_t* pUsedLen = nullptr); @@ -30,24 +29,31 @@ int32_t FXSYS_strnicmp(const char* s1, const char* s2, size_t count); inline bool FXSYS_islower(int32_t ch) { return ch >= 'a' && ch <= 'z'; } + inline bool FXSYS_isupper(int32_t ch) { return ch >= 'A' && ch <= 'Z'; } + inline int32_t FXSYS_tolower(int32_t ch) { return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); } + inline int32_t FXSYS_toupper(int32_t ch) { return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); } + inline bool FXSYS_iswalpha(wchar_t wch) { return (wch >= L'A' && wch <= L'Z') || (wch >= L'a' && wch <= L'z'); } + inline bool FXSYS_iswdigit(wchar_t wch) { return wch >= L'0' && wch <= L'9'; } + inline bool FXSYS_iswalnum(wchar_t wch) { return FXSYS_iswalpha(wch) || FXSYS_iswdigit(wch); } + inline bool FXSYS_iswspace(wchar_t c) { return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); } |