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:
@@ -1789,7 +1789,7 @@ std::map<CKeyID, CKey> DescriptorScriptPubKeyMan::GetKeys() const
|
||||
AssertLockHeld(cs_desc_man);
|
||||
if (m_storage.HasEncryptionKeys() && !m_storage.IsLocked()) {
|
||||
KeyMap keys;
|
||||
for (auto key_pair : m_map_crypted_keys) {
|
||||
for (const auto& key_pair : m_map_crypted_keys) {
|
||||
const CPubKey& pubkey = key_pair.second.first;
|
||||
const std::vector<unsigned char>& crypted_secret = key_pair.second.second;
|
||||
CKey key;
|
||||
|
||||
Reference in New Issue
Block a user