mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a non-trivially copyable type.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user