From b8e3e3388c151e79995b0d751be903c93c1c9799 Mon Sep 17 00:00:00 2001 From: matrackif Date: Sat, 4 Dec 2021 17:46:36 +0100 Subject: [PATCH] Fix sign conversion (-Wsign-conversion) warning treated as error in num_digits() --- include/fmt/chrono.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 6453d526..21b940d9 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1395,7 +1395,7 @@ template class subsecond_helper { /// then we return 6 for microseconds precision static constexpr int num_digits(std::intmax_t num, std::intmax_t den, - std::uint32_t n = 0) { + int n = 0) { return num % den == 0 ? n : (n > 18 ? 6 : num_digits(num * 10, den, n + 1)); }