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

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

Issue 1773733002: Review and cleanup lint warnings. (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
« no previous file with comments | « fpdfsdk/src/javascript/PublicMethods.h ('k') | fpdfsdk/src/javascript/app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/PublicMethods.cpp
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index f228072b3565752fc4745d412e49b7a4f269f529..014dea2d6aa083e908f2c9ad831283ce9e8767c7 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -7,6 +7,8 @@
#include "fpdfsdk/src/javascript/PublicMethods.h"
#include <algorithm>
+#include <string>
+#include <vector>
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
@@ -77,8 +79,8 @@ static const FX_WCHAR* const fullmonths[] = {L"January",
L"November",
L"December"};
-FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string) {
- CFX_WideString sTrim = StrTrim(string);
+FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* str) {
+ CFX_WideString sTrim = StrTrim(str);
const FX_WCHAR* pTrim = sTrim.c_str();
const FX_WCHAR* p = pTrim;
@@ -228,17 +230,17 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(CJS_Runtime* pRuntime,
return StrArray;
}
-int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& string,
+int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& str,
int nStart,
int& nSkip,
int nMaxStep) {
int nRet = 0;
nSkip = 0;
- for (int i = nStart, sz = string.GetLength(); i < sz; i++) {
+ for (int i = nStart, sz = str.GetLength(); i < sz; i++) {
if (i - nStart > 10)
break;
- FX_WCHAR c = string.GetAt(i);
+ FX_WCHAR c = str.GetAt(i);
if (!FXSYS_iswdigit(c))
break;
@@ -251,14 +253,13 @@ int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& string,
return nRet;
}
-CFX_WideString CJS_PublicMethods::ParseStringString(
- const CFX_WideString& string,
- int nStart,
- int& nSkip) {
+CFX_WideString CJS_PublicMethods::ParseStringString(const CFX_WideString& str,
+ int nStart,
+ int& nSkip) {
CFX_WideString swRet;
nSkip = 0;
- for (int i = nStart, sz = string.GetLength(); i < sz; i++) {
- FX_WCHAR c = string.GetAt(i);
+ for (int i = nStart, sz = str.GetLength(); i < sz; i++) {
+ FX_WCHAR c = str.GetAt(i);
if (!FXSYS_iswdigit(c))
break;
« no previous file with comments | « fpdfsdk/src/javascript/PublicMethods.h ('k') | fpdfsdk/src/javascript/app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698