diff --git a/arcanist/linter/LocaleDependenceLinter.php b/arcanist/linter/LocaleDependenceLinter.php --- a/arcanist/linter/LocaleDependenceLinter.php +++ b/arcanist/linter/LocaleDependenceLinter.php @@ -11,9 +11,7 @@ "src/bitcoin-tx.cpp" => [ "stoul", "trim_right", - "atoi", ], - "src/core_read.cpp" => ["is_digit"], "src/dbwrapper.cpp" => [ "stoul", "vsnprintf" @@ -23,7 +21,6 @@ "src/netbase.cpp" => ["to_lower"], "src/qt/rpcconsole.cpp" => [ "atoi", - "isdigit", ], "src/rest.cpp" => ["strtol"], "src/rpc/server.cpp" => ["to_upper"], @@ -42,9 +39,7 @@ "atoi", "strtol", ], - "src/uint256.cpp" => ["tolower"], - "src/util/system.cpp" => ["atoi", "tolower"], - "src/util/moneystr.cpp" => ["isdigit"], + "src/util/system.cpp" => ["atoi"], "src/util/strencodings.cpp" => [ "atoi", "strtol", diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #ifdef ENABLE_WALLET @@ -229,7 +230,7 @@ UniValue subelement; if (lastResult.isArray()) { for (char argch : curarg) { - if (!std::isdigit(argch)) { + if (!IsDigit(argch)) { throw std::runtime_error( "Invalid result query"); } diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include #include @@ -20,8 +21,7 @@ static void ResetArgs(ArgsManager &am, const std::string &strArg) { std::vector vecArg; if (strArg.size()) { - boost::split(vecArg, strArg, boost::is_space(), - boost::token_compress_on); + boost::split(vecArg, strArg, IsSpace, boost::token_compress_on); } // Insert dummy executable name: diff --git a/src/uint256.cpp b/src/uint256.cpp --- a/src/uint256.cpp +++ b/src/uint256.cpp @@ -30,7 +30,7 @@ } // skip 0x - if (psz[0] == '0' && tolower(psz[1]) == 'x') { + if (psz[0] == '0' && ToLower(uint8_t(psz[1])) == 'x') { psz += 2; } diff --git a/src/util/moneystr.cpp b/src/util/moneystr.cpp --- a/src/util/moneystr.cpp +++ b/src/util/moneystr.cpp @@ -18,7 +18,7 @@ // Right-trim excess zeros before the decimal point: int nTrim = 0; - for (int i = str.size() - 1; (str[i] == '0' && isdigit(str[i - 2])); --i) { + for (int i = str.size() - 1; (str[i] == '0' && IsDigit(str[i - 2])); --i) { ++nTrim; } if (nTrim) { @@ -46,7 +46,7 @@ if (*p == '.') { p++; Amount nMult = COIN / 10; - while (isdigit(*p) && (nMult > Amount::zero())) { + while (IsDigit(*p) && (nMult > Amount::zero())) { nUnits += (*p++ - '0') * nMult; nMult /= 10; } @@ -55,7 +55,7 @@ if (IsSpace(*p)) { break; } - if (!isdigit(*p)) { + if (!IsDigit(*p)) { return false; } strWhole.insert(strWhole.end(), *p); diff --git a/src/util/system.cpp b/src/util/system.cpp --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -304,7 +304,7 @@ key.erase(is_index); } #ifdef WIN32 - std::transform(key.begin(), key.end(), key.begin(), ::tolower); + std::transform(key.begin(), key.end(), key.begin(), ToLower); if (key[0] == '/') { key[0] = '-'; }