mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01: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:
@@ -33,7 +33,7 @@ void base_blob<BITS>::SetHex(const char* psz)
|
||||
psz++;
|
||||
|
||||
// skip 0x
|
||||
if (psz[0] == '0' && ToLower((unsigned char)psz[1]) == 'x')
|
||||
if (psz[0] == '0' && ToLower(psz[1]) == 'x')
|
||||
psz += 2;
|
||||
|
||||
// hex string to uint
|
||||
|
||||
Reference in New Issue
Block a user