mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
util: Make ToLower and ToUpper take a char
Unfortunately, `std::string` elements are (bare) chars. As these are the most likely type to be passed to these functions, make them use char instead of unsigned char. This avoids some casts.
This commit is contained in:
@ -589,7 +589,7 @@ bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypa
|
||||
|
||||
void Downcase(std::string& str)
|
||||
{
|
||||
std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){return ToLower(c);});
|
||||
std::transform(str.begin(), str.end(), str.begin(), [](char c){return ToLower(c);});
|
||||
}
|
||||
|
||||
std::string Capitalize(std::string str)
|
||||
|
Reference in New Issue
Block a user