summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/fpdf_font.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-04 12:13:55 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-04 22:39:39 +0000
commite8c1d4144e8407c0631116a954fa347dd39375ff (patch)
tree6a91c1197a5c183ce0cb7c792755d121dd1ca9b6 /core/fpdfapi/font/fpdf_font.cpp
parent426b85af0f780e312221b061e2699c31821872f9 (diff)
downloadpdfium-e8c1d4144e8407c0631116a954fa347dd39375ff.tar.xz
Give a couple of char to int functions better names.chromium/3090
- 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 <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/fpdf_font.cpp')
-rw-r--r--core/fpdfapi/font/fpdf_font.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index 6c48098c8a..4702947fd3 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -142,12 +142,12 @@ uint32_t CPDF_ToUnicodeMap::StringToCode(const CFX_ByteStringC& str) {
uint32_t result = 0;
if (str[0] == '<') {
for (int i = 1; i < len && std::isxdigit(str[i]); ++i)
- result = result * 16 + FXSYS_toHexDigit(str.CharAt(i));
+ result = result * 16 + FXSYS_HexCharToInt(str.CharAt(i));
return result;
}
for (int i = 0; i < len && std::isdigit(str[i]); ++i)
- result = result * 10 + FXSYS_toDecimalDigit(str.CharAt(i));
+ result = result * 10 + FXSYS_DecimalCharToInt(str.CharAt(i));
return result;
}
@@ -183,7 +183,7 @@ CFX_WideString CPDF_ToUnicodeMap::StringToWideString(
int byte_pos = 0;
wchar_t ch = 0;
for (int i = 1; i < len && std::isxdigit(str[i]); ++i) {
- ch = ch * 16 + FXSYS_toHexDigit(str[i]);
+ ch = ch * 16 + FXSYS_HexCharToInt(str[i]);
byte_pos++;
if (byte_pos == 4) {
result += ch;