From ce56557ef58facf2519f541d5cad33ea121b4c21 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 23 Jun 2016 14:00:32 -0700 Subject: Use some FXSYS methods instead of duplicating This CL uses the FXSYS_isDecimalDigit in place of a few custom IsDigit methods. It also creates an iswspace and some fractional math helper methods to share some code. Review-Url: https://codereview.chromium.org/2094453004 --- core/fxcrt/include/fx_ext.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/fxcrt/include') diff --git a/core/fxcrt/include/fx_ext.h b/core/fxcrt/include/fx_ext.h index d37db67d4a..f7aca68d64 100644 --- a/core/fxcrt/include/fx_ext.h +++ b/core/fxcrt/include/fx_ext.h @@ -53,6 +53,9 @@ inline bool FXSYS_iswdigit(wchar_t wch) { inline bool FXSYS_iswalnum(wchar_t wch) { return FXSYS_iswalpha(wch) || FXSYS_iswdigit(wch); } +inline bool FXSYS_iswspace(FX_WCHAR c) { + return (c == 0x20) || (c == 0x0d) || (c == 0x0a) || (c == 0x09); +} inline int FXSYS_toHexDigit(const FX_CHAR c) { if (!std::isxdigit(c)) @@ -77,6 +80,9 @@ inline int FXSYS_toDecimalDigit(const FX_WCHAR c) { return std::iswdigit(c) ? c - L'0' : 0; } +FX_FLOAT FXSYS_FractionalScale(size_t scale_factor, int value); +int FXSYS_FractionalScaleCount(); + uint32_t FX_HashCode_GetA(const CFX_ByteStringC& str, bool bIgnoreCase); uint32_t FX_HashCode_GetW(const CFX_WideStringC& Str, bool bIgnoreCase); -- cgit v1.2.3