mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-30 18:35:54 +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:
@@ -3434,7 +3434,7 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
|
||||
const UniValue& descriptor_vals = find_value(signer_res, internal ? "internal" : "receive");
|
||||
if (!descriptor_vals.isArray()) throw std::runtime_error(std::string(__func__) + ": Unexpected result");
|
||||
for (const UniValue& desc_val : descriptor_vals.get_array().getValues()) {
|
||||
std::string desc_str = desc_val.getValStr();
|
||||
const std::string& desc_str = desc_val.getValStr();
|
||||
FlatSigningProvider keys;
|
||||
std::string desc_error;
|
||||
std::unique_ptr<Descriptor> desc = Parse(desc_str, keys, desc_error, false);
|
||||
|
||||
Reference in New Issue
Block a user