Skip to content

Commit

Permalink
Fix warning: conditional expression is constant.
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus committed Oct 20, 2022
1 parent 8c19bf3 commit df36b33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
}
Expand Down

0 comments on commit df36b33

Please sign in to comment.