summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-29 14:56:26 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-29 14:56:26 -0400
commit589f7e0a57675efce9810c15a3e9b7c49bf0bc90 (patch)
tree6839707c05c00f227744ffc3788665cb1cb5b7bd /fpdfsdk/src/javascript/PublicMethods.cpp
parent6ed0028f1cf12ee53e9e7f657b7ba186c77a42f3 (diff)
downloadpdfium-589f7e0a57675efce9810c15a3e9b7c49bf0bc90.tar.xz
Cleanup some numeric code.
This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415933005 .
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index e898214cd8..13239aeb1d 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -116,7 +116,7 @@ FX_BOOL CJS_PublicMethods::IsDigit(wchar_t ch) {
}
FX_BOOL CJS_PublicMethods::IsDigit(char ch) {
- return (ch >= '0' && ch <= '9');
+ return std::isdigit(ch);
}
FX_BOOL CJS_PublicMethods::IsAlphabetic(wchar_t ch) {