summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/util.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-21 11:12:20 -0800
committerLei Zhang <thestig@chromium.org>2015-12-21 11:12:20 -0800
commit9559b7ad8b897abefca605098b424c9351622226 (patch)
tree42ba385740c27604a1321b8192a78cf0a2b2896f /fpdfsdk/src/javascript/util.cpp
parent1ac47ebfc2d106e25c3e13062cae2132daa49348 (diff)
downloadpdfium-9559b7ad8b897abefca605098b424c9351622226.tar.xz
Merge to XFA: 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. TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1539113002 . (cherry picked from commit f84fd2b1dac1fcca41db84d162995c38af650614) Review URL: https://codereview.chromium.org/1542693002 .
Diffstat (limited to 'fpdfsdk/src/javascript/util.cpp')
-rw-r--r--fpdfsdk/src/javascript/util.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 30df53ea72..cb9c9b2231 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -105,7 +105,7 @@ int util::ParstDataType(std::wstring* sFormat) {
return UTIL_STRING;
}
if (c == L'.' || c == L'+' || c == L'-' || c == L'#' || c == L' ' ||
- CJS_PublicMethods::IsDigit(c)) {
+ FXSYS_iswdigit(c)) {
continue;
}
break;
@@ -502,8 +502,7 @@ FX_BOOL util::scand(IJS_Context* cc,
CFX_WideString sDate = params[1].ToCFXWideString();
double dDate = JS_GetDateTime();
if (sDate.GetLength() > 0) {
- FX_BOOL bWrongFormat = FALSE;
- dDate = CJS_PublicMethods::MakeRegularDate(sDate, sFormat, bWrongFormat);
+ dDate = CJS_PublicMethods::MakeRegularDate(sDate, sFormat, nullptr);
}
if (!JS_PortIsNan(dDate)) {