refactor: use braced init for integer constants instead of c style casts

This commit is contained in:
Pasta authored and pasta committed 2023-01-03 19:31:29 -06:00
1 parent 3f8591d46b
commit f2fc03ec85
23 files changed
+47 -47

No files matched your search

+3 -3
View File
@@ -121,9 +121,9 @@ static CAmount make_hard_case(int utxos, std::vector<COutput>& utxo_pool)
utxo_pool.clear();
CAmount target = 0;
for (int i = 0; i < utxos; ++i) {
target += (CAmount)1 << (utxos+i);
add_coin((CAmount)1 << (utxos+i), 2*i, utxo_pool);
add_coin(((CAmount)1 << (utxos+i)) + ((CAmount)1 << (utxos-1-i)), 2*i + 1, utxo_pool);
target += CAmount{1} << (utxos+i);
add_coin(CAmount{1} << (utxos+i), 2*i, utxo_pool);
add_coin((CAmount{1} << (utxos+i)) + (CAmount{1} << (utxos-1-i)), 2*i + 1, utxo_pool);
}
return target;
}
+4 -4
View File
@@ -736,10 +736,10 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup)
std::vector<unsigned char> malformed_record;
CVectorWriter vw(0, 0, malformed_record, 0);
vw << std::string("notadescriptor");
vw << (uint64_t)0;
vw << (int32_t)0;
vw << (int32_t)0;
vw << (int32_t)1;
vw << uint64_t{0};
vw << int32_t{0};
vw << int32_t{0};
vw << int32_t{1};
SpanReader vr{0, 0, malformed_record};
WalletDescriptor w_desc;