From 23d576f0b498bd4f37ef2175916223a2e5ea0324 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 29 Oct 2015 15:08:50 -0400 Subject: Revert "Cleanup some numeric code." This reverts commit 589f7e0a57675efce9810c15a3e9b7c49bf0bc90. Broke the build on Mac, unable to find std::isdigit. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1428853002 . --- fpdfsdk/src/javascript/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/src/javascript/util.cpp') diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp index cf10bbd7b4..14e15c1b6f 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp @@ -425,7 +425,7 @@ void util::printx(const std::string& cFormat, break; case 'X': { while (itSource < iSize) { - if (std::isdigit(cSource[itSource]) || + if ((cSource[itSource] >= '0' && cSource[itSource] <= '9') || (cSource[itSource] >= 'a' && cSource[itSource] <= 'z') || (cSource[itSource] >= 'A' && cSource[itSource] <= 'Z')) { cPurpose += cSource[itSource]; @@ -450,7 +450,7 @@ void util::printx(const std::string& cFormat, } break; case '9': { while (itSource < iSize) { - if (std::isdigit(cSource[itSource])) { + if (cSource[itSource] >= '0' && cSource[itSource] <= '9') { cPurpose += cSource[itSource]; itSource++; break; -- cgit v1.2.3