aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorAurèle Oulès <aurele@oules.com>2022-07-26 11:12:53 +0200
committerAurèle Oulès <aurele@oules.com>2022-07-27 13:27:57 +0200
commit081b0e53e3adca7ea57d23e5fcd9db4b86415a72 (patch)
tree877f1eb2d246084e645f8cf5961d5541438a308b /src/test/script_tests.cpp
parent7f79746bf046d0028bb68f265804b9774dec2acb (diff)
downloadbitcoin-081b0e53e3adca7ea57d23e5fcd9db4b86415a72.tar.xz
refactor: Make const refs vars where applicable
This avoids initializing variables with the copy-constructor of a non-trivially copyable type.
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 9e7a376d6b..935194057c 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -942,7 +942,7 @@ BOOST_AUTO_TEST_CASE(script_json_test)
UniValue tests = read_json(std::string(json_tests::script_tests, json_tests::script_tests + sizeof(json_tests::script_tests)));
for (unsigned int idx = 0; idx < tests.size(); idx++) {
- UniValue test = tests[idx];
+ const UniValue& test = tests[idx];
std::string strTest = test.write();
CScriptWitness witness;
CAmount nValue = 0;