Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: fpdfsdk/javascript/PublicMethods.h

Issue 1797423002: Fix CJS_PublicMethods::IsNumber() with unit test and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/javascript/PublicMethods.h
diff --git a/fpdfsdk/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h
index 8961c5abc832423870f60774a9655ed5a6e5b545..16cc5bc21abfd309e02bdbc119f3432c2bd66f29 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<CJS_Value>& 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,

Powered by Google App Engine
This is Rietveld 408576698