Fix a warning abou unsafe mix of uint64_t and bool

This commit is contained in:
Junekey Jeon 2023-01-11 18:26:17 -08:00
parent ab9ef0e87e
commit ab34e7d1dd

View File

@ -3496,7 +3496,8 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
} else { } else {
// We may need to round-up. // We may need to round-up.
buf.try_resize(1); buf.try_resize(1);
if ((first_segment | has_more_segments) > 5000000000000000000ULL) { if ((first_segment | static_cast<uint64_t>(has_more_segments)) >
5000000000000000000ULL) {
buf[0] = '1'; buf[0] = '1';
} else { } else {
buf[0] = '0'; buf[0] = '0';
@ -4293,7 +4294,9 @@ template <> struct formatter<bytes> {
}; };
// group_digits_view is not derived from view because it copies the argument. // group_digits_view is not derived from view because it copies the argument.
template <typename T> struct group_digits_view { T value; }; template <typename T> struct group_digits_view {
T value;
};
/** /**
\rst \rst