From a9c9c0c5513d5ccc2c4f42a5282acfcf691459f5 Mon Sep 17 00:00:00 2001 From: Jin S Date: Mon, 11 Dec 2023 14:19:17 -0500 Subject: [PATCH] fix unsigned warning --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 4093e37d..ad04bc41 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2167,8 +2167,8 @@ auto write_int(OutputIt out, UInt value, unsigned prefix, throw_format_error("invalid format specifier"); } - unsigned size = to_unsigned((prefix != 0 ? prefix >> 24 : 0) + num_digits + - grouping.count_separators(num_digits)); + unsigned size = (prefix != 0 ? prefix >> 24 : 0) + to_unsigned(num_digits) + + to_unsigned(grouping.count_separators(num_digits)); return write_padded( out, specs, size, size, [&](reserve_iterator it) { for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)