mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
util: refactor upper/lowercase functions
This includes renaming Downcase() to ToLower() and make it return a string rather than modify referenced arg. Also adds ToUpper() string version.
This commit is contained in:
@@ -37,8 +37,8 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP;
|
||||
static const int SOCKS5_RECV_TIMEOUT = 20 * 1000;
|
||||
static std::atomic<bool> interruptSocks5Recv(false);
|
||||
|
||||
enum Network ParseNetwork(std::string net) {
|
||||
Downcase(net);
|
||||
enum Network ParseNetwork(const std::string& net_in) {
|
||||
std::string net = ToLower(net_in);
|
||||
if (net == "ipv4") return NET_IPV4;
|
||||
if (net == "ipv6") return NET_IPV6;
|
||||
if (net == "onion") return NET_ONION;
|
||||
|
||||
Reference in New Issue
Block a user