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:
Vladislav Shchapov 2022-10-20 19:49:53 +05:00 committed by GitHub
parent 8c19bf3f2f
commit e1ffa7655d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {};
}