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

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

Issue 1757283002: Combine StrToInt methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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/util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/util.cpp
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 4bc28cd03a85230d73556787286ed0f185c7a015..c9149be570e68510c7e0f4e17ba22151353ecce7 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -512,30 +512,6 @@ FX_BOOL util::scand(IJS_Context* cc,
return TRUE;
}
-int64_t FX_atoi64(const char* nptr) {
- int c; /* current char */
- int64_t total; /* current total */
- int sign; /* if '-', then negative, otherwise positive */
-
- /* skip whitespace */
- while (isspace((int)(unsigned char)*nptr))
- ++nptr;
-
- c = (int)(unsigned char)*nptr++;
- sign = c; /* save sign indication */
- if (c == '-' || c == '+')
- c = (int)(unsigned char)*nptr++; /* skip sign */
-
- total = 0;
-
- while (isdigit(c)) {
- total = 10 * total + FXSYS_toDecimalDigit(c); /* accumulate digit */
- c = (int)(unsigned char)*nptr++; /* get next char */
- }
-
- return sign == '-' ? -total : total;
-}
-
FX_BOOL util::byteToChar(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
« no previous file with comments | « fpdfsdk/src/javascript/util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698