Fix warning C4018: '<=': signed/unsigned mismatch

This commit is contained in:
Kazantcev Andrey 2020-10-01 15:25:31 +03:00 committed by GitHub
parent 05a28312cf
commit 57d991026c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1790,8 +1790,8 @@ bool check_divisibility_and_divide_by_pow5(uint32_t& n) FMT_NOEXCEPT {
template <int N> uint32_t small_division_by_pow10(uint32_t n) FMT_NOEXCEPT {
static constexpr struct {
uint32_t magic_number;
int shift_amount;
int divisor_times_10;
uint32_t shift_amount;
uint32_t divisor_times_10;
} infos[] = {{0xcccd, 19, 100}, {0xa3d8, 22, 1000}};
constexpr auto info = infos[N - 1];
FMT_ASSERT(n <= info.divisor_times_10, "n is too large");