summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-21 11:07:54 -0800
committerLei Zhang <thestig@chromium.org>2015-12-21 11:07:54 -0800
commitf84fd2b1dac1fcca41db84d162995c38af650614 (patch)
tree79c87c1ace50a1762c9d64f3cbb9eb334556a8b2 /fpdfsdk/src/javascript/PublicMethods.h
parentbd35d484a4027775f19ff93e9143e0b270133d42 (diff)
downloadpdfium-f84fd2b1dac1fcca41db84d162995c38af650614.tar.xz
Cleanup CJS_PublicMethods:
- Use FXSYS_iswdigit() instead of CJS_PublicMethods::IsDigit(). - Ditto for FXSYS_iswalpha() and FXSYS_iswalnum(). - Change CJS_PublicMethods::ParseNormalDate() and CJS_PublicMethods::MakeRegularDate() to take an out parameter by ptr. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1539113002 .
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/src/javascript/PublicMethods.h
index 80465035ea..013c4ce1a4 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/src/javascript/PublicMethods.h
@@ -11,7 +11,8 @@
class CJS_PublicMethods : public CJS_Object {
public:
- CJS_PublicMethods(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
+ explicit CJS_PublicMethods(v8::Local<v8::Object> pObject)
+ : CJS_Object(pObject) {}
~CJS_PublicMethods() override {}
public:
@@ -140,7 +141,7 @@ class CJS_PublicMethods : public CJS_Object {
int& nSkip);
static double MakeRegularDate(const CFX_WideString& value,
const CFX_WideString& format,
- FX_BOOL& bWrongFormat);
+ bool* bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,
const CFX_WideString& format);
static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource,
@@ -148,7 +149,7 @@ class CJS_PublicMethods : public CJS_Object {
FX_BOOL& bDot);
static double ParseStringToNumber(const FX_WCHAR* swSource);
static double ParseNormalDate(const CFX_WideString& value,
- FX_BOOL& bWrongFormat);
+ bool* bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
static double ParseNumber(const FX_WCHAR* swSource,
FX_BOOL& bAllDigits,
@@ -168,11 +169,6 @@ class CJS_PublicMethods : public CJS_Object {
static FX_BOOL IsNumber(const FX_CHAR* string);
static FX_BOOL IsNumber(const FX_WCHAR* string);
- static FX_BOOL IsDigit(char ch);
- static FX_BOOL IsDigit(wchar_t ch);
- static FX_BOOL IsAlphabetic(wchar_t ch);
- static FX_BOOL IsAlphaNumeric(wchar_t ch);
-
static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
static FX_BOOL isReservedMaskChar(wchar_t ch);