mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-15 09:09:46 +02:00
Use the character based overload for std::string::find.
std::string::find has a character based overload as can be seen here (4th oveload): http://www.cplusplus.com/reference/string/string/find/ Use that instead of constantly allocating temporary strings.
This commit is contained in:
@@ -516,7 +516,7 @@ UniValue setban(const JSONRPCRequest& request)
|
||||
CNetAddr netAddr;
|
||||
bool isSubnet = false;
|
||||
|
||||
if (request.params[0].get_str().find("/") != std::string::npos)
|
||||
if (request.params[0].get_str().find('/') != std::string::npos)
|
||||
isSubnet = true;
|
||||
|
||||
if (!isSubnet) {
|
||||
|
||||
Reference in New Issue
Block a user