aboutsummaryrefslogtreecommitdiff
path: root/src/core_read.cpp
diff options
context:
space:
mode:
authorAurèle Oulès <aurele@oules.com>2022-07-26 11:12:53 +0200
committerAurèle Oulès <aurele@oules.com>2022-07-27 13:27:57 +0200
commit081b0e53e3adca7ea57d23e5fcd9db4b86415a72 (patch)
tree877f1eb2d246084e645f8cf5961d5541438a308b /src/core_read.cpp
parent7f79746bf046d0028bb68f265804b9774dec2acb (diff)
downloadbitcoin-081b0e53e3adca7ea57d23e5fcd9db4b86415a72.tar.xz
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a non-trivially copyable type.
Diffstat (limited to 'src/core_read.cpp')
-rw-r--r--src/core_read.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 77c516427a..ec21a2f7f4 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -265,7 +265,7 @@ int ParseSighashString(const UniValue& sighash)
{std::string("SINGLE"), int(SIGHASH_SINGLE)},
{std::string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)},
};
- std::string strHashType = sighash.get_str();
+ const std::string& strHashType = sighash.get_str();
const auto& it = map_sighash_values.find(strHashType);
if (it != map_sighash_values.end()) {
hash_type = it->second;