aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/client.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-01-29 13:51:03 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-01-29 14:08:09 +0100
commitf3c7062b7bbf7473f318afffd73537d1d387c88a (patch)
tree4fd2a123173cd8a512bc117863276348227e4396 /src/rpc/client.cpp
parent9220426280d0c4ac648bd7b0ccf64ea861e4d491 (diff)
parenta73aab7cd8343d795b1a7408bd71f522262ac76e (diff)
downloadbitcoin-f3c7062b7bbf7473f318afffd73537d1d387c88a.tar.xz
Merge #12159: Use the character based overload for std::string::find.
a73aab7 Use the character based overload for std::string::find. (Alin Rus) Pull request description: 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. Tree-SHA512: dc7684b1551e6d779eb989e9a74363f9b978059a7c0f3db09d01744c7e6452961f9e671173265e71efff27afbcb80c0fe2c11b6dff2290e54a49193fa25a5679
Diffstat (limited to 'src/rpc/client.cpp')
-rw-r--r--src/rpc/client.cpp2
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)"));
}