From ce56557ef58facf2519f541d5cad33ea121b4c21 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 23 Jun 2016 14:00:32 -0700 Subject: Use some FXSYS methods instead of duplicating This CL uses the FXSYS_isDecimalDigit in place of a few custom IsDigit methods. It also creates an iswspace and some fractional math helper methods to share some code. Review-Url: https://codereview.chromium.org/2094453004 --- xfa/fxfa/parser/xfa_utils_imp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/parser/xfa_utils_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp index b1fe7b3524..f5da036498 100644 --- a/xfa/fxfa/parser/xfa_utils_imp.cpp +++ b/xfa/fxfa/parser/xfa_utils_imp.cpp @@ -303,7 +303,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { nIntegralLen > 17) { break; } - if (!XFA_IsDigit(str[cc])) { + if (!FXSYS_isDecimalDigit(str[cc])) { return 0; } nIntegral = nIntegral * 10 + str[cc] - '0'; @@ -326,7 +326,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { str[cc] == 'E' || str[cc] == 'e') { break; } - if (!XFA_IsDigit(str[cc])) { + if (!FXSYS_isDecimalDigit(str[cc])) { return 0; } } @@ -343,7 +343,7 @@ FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal) { } } while (cc < len) { - if (str[cc] == '.' || !XFA_IsDigit(str[cc])) { + if (str[cc] == '.' || !FXSYS_isDecimalDigit(str[cc])) { return 0; } nExponent = nExponent * 10 + str[cc] - '0'; -- cgit v1.2.3