From e8c1d4144e8407c0631116a954fa347dd39375ff Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 4 May 2017 12:13:55 -0700 Subject: Give a couple of char to int functions better names. - FXSYS_toDecimalDigit() becomes FXSYS_DecimalCharToInt(). - FXSYS_toHexDigit() becomes FXSYS_HexCharToInt(). Change-Id: If4683e8f85f05124b92ff075056cbc295442087d Reviewed-on: https://pdfium-review.googlesource.com/4930 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- fpdfsdk/cpdfsdk_datetime.cpp | 16 ++++++++-------- fpdfsdk/javascript/PublicMethods.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_datetime.cpp b/fpdfsdk/cpdfsdk_datetime.cpp index 47c764ce6e..d2653fca74 100644 --- a/fpdfsdk/cpdfsdk_datetime.cpp +++ b/fpdfsdk/cpdfsdk_datetime.cpp @@ -146,7 +146,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( char ch; while (i < strLength && j < 4) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -160,7 +160,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -174,7 +174,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -188,7 +188,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -202,7 +202,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -216,7 +216,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -237,7 +237,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; @@ -253,7 +253,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString( k = 0; while (i < strLength && j < 2) { ch = dtStr[i]; - k = k * 10 + FXSYS_toDecimalDigit(ch); + k = k * 10 + FXSYS_DecimalCharToInt(ch); j++; if (!std::isdigit(ch)) break; diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index 759fd91a4d..2efcacdde9 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -238,7 +238,7 @@ int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& str, if (!std::iswdigit(c)) break; - nRet = nRet * 10 + FXSYS_toDecimalDigit(c); + nRet = nRet * 10 + FXSYS_DecimalCharToInt(c); nSkip = i - nStart + 1; if (nSkip >= nMaxStep) break; -- cgit v1.2.3