diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -777,7 +777,7 @@ // while still verifying that the CoinsViewCache::AddCoin implementation ignores // base values. template static void CheckAddCoin(Args &&... args) { - for (const Amount base_value : {ABSENT, PRUNED, VALUE1}) { + for (const Amount &base_value : {ABSENT, PRUNED, VALUE1}) { CheckAddCoinBase(base_value, std::forward(args)...); } } @@ -897,8 +897,8 @@ // they would be too repetitive (the parent cache is never updated in these // cases). The loop below covers these cases and makes sure the parent cache // is always left unchanged. - for (const Amount parent_value : {ABSENT, PRUNED, VALUE1}) { - for (const Amount child_value : {ABSENT, PRUNED, VALUE2}) { + for (const Amount &parent_value : {ABSENT, PRUNED, VALUE1}) { + for (const Amount &child_value : {ABSENT, PRUNED, VALUE2}) { for (const char parent_flags : parent_value == ABSENT ? ABSENT_FLAGS : FLAGS) { for (const char child_flags :