mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-06 01:39:55 +08:00
Fix compiler warning
This commit is contained in:
parent
a0166941c2
commit
4435698a7a
@ -1251,7 +1251,7 @@ FMT_CONSTEXPR20 auto do_format_decimal(Char* out, UInt value, int size)
|
||||
if (!is_constant_evaluated() && sizeof(UInt) == 4) {
|
||||
auto p = value * ((1ull << 39) / 100 + 1);
|
||||
write2digits_i(out + n, p >> (39 - 7) & ((1 << 7) - 1));
|
||||
value = (p >> 39) + ((value >= (100u << 25)) << 25);
|
||||
value = static_cast<UInt>(p >> 39) + (static_cast<UInt>(value >= (100u << 25)) << 25);
|
||||
} else {
|
||||
// Integer division is slow so do it for a group of two digits instead
|
||||
// of for every digit. The idea comes from the talk by Alexandrescu
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user