Merge pull request #160 from huangqinjin/uint64-to-bool

Fix compile warning of unit64_t to bool
This commit is contained in:
Daniel Lemire 2022-12-23 10:39:33 -05:00 committed by GitHub
commit 102e74891f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,8 +125,8 @@ void round_nearest_tie_even(adjusted_mantissa& am, int32_t shift, callback cb) n
halfway = uint64_t(1) << (shift - 1);
}
uint64_t truncated_bits = am.mantissa & mask;
uint64_t is_above = truncated_bits > halfway;
uint64_t is_halfway = truncated_bits == halfway;
bool is_above = truncated_bits > halfway;
bool is_halfway = truncated_bits == halfway;
// shift digits into position
if (shift == 64) {