mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Fix warning: conditional expression is constant. (#3150)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru> Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
parent
8c19bf3f2f
commit
e1ffa7655d
@ -212,7 +212,8 @@ To safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
|
||||
}
|
||||
const auto min1 =
|
||||
(std::numeric_limits<IntermediateRep>::min)() / Factor::num;
|
||||
if (!std::is_unsigned<IntermediateRep>::value && count < min1) {
|
||||
if (detail::const_check(!std::is_unsigned<IntermediateRep>::value) &&
|
||||
count < min1) {
|
||||
ec = 1;
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user