From 166faf98c1d4a83370fc92809c372741ae273eb6 Mon Sep 17 00:00:00 2001 From: Federico Busato Date: Tue, 5 Jul 2022 16:33:24 -0700 Subject: [PATCH] pointless comparison of unsigned integer with zero, fix 2 --- 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 f99461fa..54e28488 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -203,7 +203,7 @@ To safe_duration_cast(std::chrono::duration from, } const auto min1 = (std::numeric_limits::min)() / Factor::num; - if (count < min1) { + if (std::is_unsigned::value || count < min1) { ec = 1; return {}; }