Fix Windows build. (#2012)

* Remove duplicate using uint64_t.

* Cast before shift.
This commit is contained in:
Seunghoon Lee
2025-04-02 04:22:10 +09:00
committed by GitHub
parent c59a8bb206
commit df32020f93
2 changed files with 1 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ struct magic_division32_bit_range
shift_u32++;
};
uint64_t tmp_u64 = ((1UL << shift_u32) - divisor) << 32;
uint64_t tmp_u64 = static_cast<uint64_t>((1UL << shift_u32) - divisor) << 32;
uint32_t multiplier_u32 = tmp_u64 / divisor + 1;
return make_tuple(multiplier_u32, shift_u32);