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

This commit is contained in:
Pasta
2021-12-18 12:50:58 -05:00
committed by pasta
parent 3f8591d46b
commit f2fc03ec85
23 changed files with 47 additions and 47 deletions

View File

@@ -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);
}