From c5736710f9662638eb2093c1ee8855b22fe19cc8 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Thu, 22 May 2025 10:43:01 +0530 Subject: [PATCH] arguments are already unsigned --- 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 905b0a56..61465e98 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2137,14 +2137,14 @@ FMT_CONSTEXPR auto handle_precision( FMT_ENABLE_IF(std::is_same::value)) -> size_t { auto code_points = count_code_points_with_display_width_precision( s, to_unsigned(specs.precision)); - return code_point_index(s, to_unsigned(code_points)); + return code_point_index(s, code_points); } template FMT_CONSTEXPR auto handle_precision( basic_string_view s, const format_specs&, FMT_ENABLE_IF(!std::is_same::value)) -> size_t { - return code_point_index(s, to_unsigned(s.size())); + return code_point_index(s, s.size()); } template