summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_utils_imp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 14:00:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 14:00:32 -0700
commitce56557ef58facf2519f541d5cad33ea121b4c21 (patch)
treeda8de59a3cd5b7abcd7603eba3ba46e0d503daab /xfa/fxfa/parser/xfa_utils_imp.cpp
parentb97784706ec898ff6b1c36f1564c0c66f9419b17 (diff)
downloadpdfium-ce56557ef58facf2519f541d5cad33ea121b4c21.tar.xz
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
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_utils_imp.cpp6
1 files changed, 3 insertions, 3 deletions
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';