From 614d20a64195e64c047432251e3fb3e7b5142425 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Tue, 15 Mar 2016 13:55:12 -0700 Subject: Fix CJS_PublicMethods::IsNumber() with unit test and some cleanup R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1797423002 . --- fpdfsdk/javascript/PublicMethods.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'fpdfsdk/javascript/PublicMethods.h') diff --git a/fpdfsdk/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h index 8961c5abc8..16cc5bc21a 100644 --- a/fpdfsdk/javascript/PublicMethods.h +++ b/fpdfsdk/javascript/PublicMethods.h @@ -18,7 +18,6 @@ class CJS_PublicMethods : public CJS_Object { : CJS_Object(pObject) {} ~CJS_PublicMethods() override {} - public: static FX_BOOL AFNumber_Format(IJS_Context* cc, const std::vector& params, CJS_Value& vRet, @@ -108,7 +107,6 @@ class CJS_PublicMethods : public CJS_Object { CJS_Value& vRet, CFX_WideString& sError); - public: JS_STATIC_GLOBAL_FUN(AFNumber_Format); JS_STATIC_GLOBAL_FUN(AFNumber_Keystroke); JS_STATIC_GLOBAL_FUN(AFPercent_Format); @@ -134,7 +132,6 @@ class CJS_PublicMethods : public CJS_Object { JS_STATIC_DECLARE_GLOBAL_FUN(); - public: static int ParseStringInteger(const CFX_WideString& string, int nStart, int& nSkip, @@ -151,7 +148,6 @@ class CJS_PublicMethods : public CJS_Object { bool* bWrongFormat); static double MakeInterDate(CFX_WideString strValue); - public: static CFX_WideString StrLTrim(const FX_WCHAR* pStr); static CFX_WideString StrRTrim(const FX_WCHAR* pStr); static CFX_WideString StrTrim(const FX_WCHAR* pStr); @@ -160,11 +156,10 @@ class CJS_PublicMethods : public CJS_Object { static CFX_ByteString StrRTrim(const FX_CHAR* pStr); static CFX_ByteString StrTrim(const FX_CHAR* pStr); - static FX_BOOL IsNumber(const FX_CHAR* string); - static FX_BOOL IsNumber(const FX_WCHAR* string); + static bool IsNumber(const FX_WCHAR* string); - static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask); - static FX_BOOL isReservedMaskChar(wchar_t ch); + static bool maskSatisfied(wchar_t c_Change, wchar_t c_Mask); + static bool isReservedMaskChar(wchar_t ch); static double AF_Simple(const FX_WCHAR* sFuction, double dValue1, -- cgit v1.2.3