mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +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:
@@ -28,7 +28,7 @@ bool ExternalSigner::Enumerate(const std::string& command, std::vector<ExternalS
|
||||
if (!result.isArray()) {
|
||||
throw std::runtime_error(strprintf("'%s' received invalid response, expected array of signers", command));
|
||||
}
|
||||
for (UniValue signer : result.getValues()) {
|
||||
for (const UniValue& signer : result.getValues()) {
|
||||
// Check for error
|
||||
const UniValue& error = find_value(signer, "error");
|
||||
if (!error.isNull()) {
|
||||
|
||||
Reference in New Issue
Block a user