mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
refactor: use braced init for integer constants instead of c style casts
This commit is contained in:
@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(fastrandom_randbits)
|
||||
for (int j = 0; j < 1000; ++j) {
|
||||
uint64_t rangebits = ctx1.randbits(bits);
|
||||
BOOST_CHECK_EQUAL(rangebits >> bits, 0U);
|
||||
uint64_t range = ((uint64_t)1) << bits | rangebits;
|
||||
uint64_t range = (uint64_t{1}) << bits | rangebits;
|
||||
uint64_t rand = ctx2.randrange(range);
|
||||
BOOST_CHECK(rand < range);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user