diff options
author | Alin Rus <alin@fsck.ro> | 2018-01-11 21:40:51 +0100 |
---|---|---|
committer | Alin Rus <alin@fsck.ro> | 2018-01-11 21:40:51 +0100 |
commit | a73aab7cd8343d795b1a7408bd71f522262ac76e (patch) | |
tree | 3e269a8f345cdd4ae3de43b277a11255295aa2ca /src/rpc/client.cpp | |
parent | 1d2eaba300bc13c556e3cb05420dcc91ae12e1d0 (diff) |
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.
Diffstat (limited to 'src/rpc/client.cpp')
-rw-r--r-- | src/rpc/client.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index f63e970bdd..b88c1bccd5 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -213,7 +213,7 @@ UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<s UniValue params(UniValue::VOBJ); for (const std::string &s: strParams) { - size_t pos = s.find("="); + size_t pos = s.find('='); if (pos == std::string::npos) { throw(std::runtime_error("No '=' in named argument '"+s+"', this needs to be present for every argument (even if it is empty)")); } |