diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-03 17:12:58 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-03 17:12:58 -0500 |
commit | 1c91537c9f9669246713a5be628493ae2fc4899a (patch) | |
tree | b40c06fde5dd0410f4eb7a0734f11758aa6c5d37 /core/src/fxcrt/fx_basic_wstring.cpp | |
parent | 44beca7313284a60c21b4973d42f993b8c248ec9 (diff) | |
download | pdfium-1c91537c9f9669246713a5be628493ae2fc4899a.tar.xz |
Combine StrToInt methods.
This Cl combines the two StrToInt implementations. In doing so I had to add
some more overrides to toDecimalDigit() and add a isDecimalDigit().
BUG=pdfium:423
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1757283002 .
Diffstat (limited to 'core/src/fxcrt/fx_basic_wstring.cpp')
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index 396dbc4fff..8df72466e8 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -994,7 +994,7 @@ FX_FLOAT FX_wtof(const FX_WCHAR* str, int len) { if (str[cc] == '.') { break; } - integer = integer * 10 + FXSYS_toDecimalDigitWide(str[cc]); + integer = integer * 10 + FXSYS_toDecimalDigit(str[cc]); cc++; } FX_FLOAT fraction = 0; @@ -1002,7 +1002,7 @@ FX_FLOAT FX_wtof(const FX_WCHAR* str, int len) { cc++; FX_FLOAT scale = 0.1f; while (cc < len) { - fraction += scale * FXSYS_toDecimalDigitWide(str[cc]); + fraction += scale * FXSYS_toDecimalDigit(str[cc]); scale *= 0.1f; cc++; } |