Skip to content

Commit

Permalink
Use ToLower(...) instead of std::tolower
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Nov 6, 2018
1 parent e70cc89 commit c5fd143
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/uint256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void base_blob<BITS>::SetHex(const char* psz)
psz++;

// skip 0x
if (psz[0] == '0' && tolower(psz[1]) == 'x')
if (psz[0] == '0' && ToLower((unsigned char)psz[1]) == 'x')
psz += 2;

// hex string to uint
Expand Down
2 changes: 1 addition & 1 deletion src/util/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ bool ArgsManager::ParseParameters(int argc, const char* const argv[], std::strin
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] = '-';
#endif
Expand Down
2 changes: 0 additions & 2 deletions test/lint/lint-locale-dependence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ KNOWN_VIOLATIONS=(
"src/test/getarg_tests.cpp.*split"
"src/torcontrol.cpp:.*atoi"
"src/torcontrol.cpp:.*strtol"
"src/uint256.cpp:.*tolower"
"src/util/system.cpp:.*atoi"
"src/util/system.cpp:.*fprintf"
"src/util/system.cpp:.*tolower"
"src/util/strencodings.cpp:.*atoi"
"src/util/strencodings.cpp:.*strtol"
"src/util/strencodings.cpp:.*strtoul"
Expand Down

0 comments on commit c5fd143

Please sign in to comment.