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:
Aurèle Oulès
2022-07-26 11:12:53 +02:00
parent 7f79746bf0
commit 081b0e53e3
27 changed files with 39 additions and 39 deletions

View File

@@ -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()) {