refactor: use braced init for integer constants instead of c style casts
This commit is contained in:
23 files changed
+47
-47
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user