diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-10 01:46:32 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-10 02:51:14 +0100 |
commit | 332b3dd7c156daa08df347dc3359f0ee99ce4baa (patch) | |
tree | bbd9ee1fdcad37089529f7728774150562e2c0e4 /src/util/strencodings.cpp | |
parent | edb5bb35000e13e001e2693fbff4e8cc9358e166 (diff) |
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.
Diffstat (limited to 'src/util/strencodings.cpp')
-rw-r--r-- | src/util/strencodings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/strencodings.cpp b/src/util/strencodings.cpp index 46146be66f..fedeeac39b 100644 --- a/src/util/strencodings.cpp +++ b/src/util/strencodings.cpp @@ -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) |