mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02: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:
parent
7f79746bf0
commit
081b0e53e3
27 changed files with 39 additions and 39 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue