From 081b0e53e3adca7ea57d23e5fcd9db4b86415a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A8le=20Oul=C3=A8s?= Date: Tue, 26 Jul 2022 11:12:53 +0200 Subject: refactor: Make const refs vars where applicable This avoids initializing variables with the copy-constructor of a non-trivially copyable type. --- src/wallet/rpc/spend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/rpc') diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index b5472efa61..bd0f2f4824 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -1407,7 +1407,7 @@ RPCHelpMan sendall() } CAmount output_amounts_claimed{0}; - for (CTxOut out : rawTx.vout) { + for (const CTxOut& out : rawTx.vout) { output_amounts_claimed += out.nValue; } -- cgit v1.2.3