diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-09 09:59:23 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-09 09:59:23 -0500 |
commit | 3ebd121d45ceb08918a3dcb5b3b7ac29448c862f (patch) | |
tree | 361d5fa0f9be7484cce4aace1b9cc18545046611 /fpdfsdk/src/javascript/PublicMethods.cpp | |
parent | 317758574e173367b41928a1575d70600c6b6ea8 (diff) | |
download | pdfium-3ebd121d45ceb08918a3dcb5b3b7ac29448c862f.tar.xz |
Review and cleanup lint warnings.
This CL goes through the remaining list of list warnings and records why they
are currently blacklisted, or fixes and enables them.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1773733002 .
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/PublicMethods.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp index f228072b35..014dea2d6a 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; |