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

Unified Diff: fpdfsdk/src/javascript/PublicMethods.cpp

Issue 1398703009: Next round of XFA changes to match master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove arg Created 5 years, 2 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/src/javascript/PublicMethods.cpp
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 0b3b38f8f184dcb42436308e7ad5ec5648776425..71726a2db0b1dd7952d3bbc8163ce2f4b2c91c0a 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -48,9 +48,18 @@ END_JS_STATIC_GLOBAL_FUN()
IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods)
-static const FX_WCHAR* months[] = {L"Jan", L"Feb", L"Mar", L"Apr",
- L"May", L"Jun", L"Jul", L"Aug",
- L"Sep", L"Oct", L"Nov", L"Dec"};
+static const FX_WCHAR* const months[] = {L"Jan",
+ L"Feb",
+ L"Mar",
+ L"Apr",
+ L"May",
+ L"Jun",
+ L"Jul",
+ L"Aug",
+ L"Sep",
+ L"Oct",
+ L"Nov",
+ L"Dec"};
static const FX_WCHAR* const fullmonths[] = {
L"January", L"February", L"March", L"April",
@@ -935,7 +944,7 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
strValue.Replace(",", ".");
double dValue = atof(strValue);
if (iDec > 0)
- dValue += DOUBLE_CORRECT; //
+ dValue += DOUBLE_CORRECT;
int iDec2;
int iNegative = 0;
@@ -984,11 +993,7 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
else
cSeperator = '.';
- int iDecPositive, iDecNegative;
- iDecPositive = iDec2;
- iDecNegative = iDec2;
-
- for (iDecPositive = iDec2 - 3; iDecPositive > 0; iDecPositive -= 3) {
+ for (int iDecPositive = iDec2 - 3; iDecPositive > 0; iDecPositive -= 3) {
strValue.Insert(iDecPositive, cSeperator);
iMax++;
}
@@ -1274,11 +1279,7 @@ FX_BOOL CJS_PublicMethods::AFPercent_Format(IJS_Context* cc,
else
cSeperator = '.';
- int iDecPositive, iDecNegative;
- iDecPositive = iDec2;
- iDecNegative = iDec2;
-
- for (iDecPositive = iDec2 - 3; iDecPositive > 0; iDecPositive -= 3) {
+ for (int iDecPositive = iDec2 - 3; iDecPositive > 0; iDecPositive -= 3) {
strValue.Insert(iDecPositive, cSeperator);
iMax++;
}

Powered by Google App Engine
This is Rietveld 408576698