diff options
author | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2019-08-07 13:42:54 +0900 |
---|---|---|
committer | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2019-08-08 11:35:14 +0900 |
commit | 0481fa25844dc6ec9f6c3fac8428d874d34b0ad0 (patch) | |
tree | a47bab88fa0ff0abc0ea48b3c90cce6bd3e86a00 /src/netbase.cpp | |
parent | e5fdda68c6d2313edb74443f0d1e6d2ce2d97f5e (diff) |
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.
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 6d4738c835..0148aea428 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -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; |