Skip to content

Commit

Permalink
avoid clang tidy warning (#3646)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyWoo committed Jun 27, 2022
1 parent a785705 commit b23488d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Foundation/include/Poco/Dynamic/VarHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class Foundation_API VarHolder
throw RangeException("Value too large.");
}
else
if (from > std::numeric_limits<T>::max())
if (from > static_cast<F>(std::numeric_limits<T>::max()))
{
throw RangeException("Value too large.");
}
Expand Down Expand Up @@ -457,7 +457,7 @@ class Foundation_API VarHolder
template <typename F, typename T>
void checkLowerLimit(const F& from) const
{
if (from < std::numeric_limits<T>::min())
if (from < static_cast<F>(std::numeric_limits<T>::min()))
throw RangeException("Value too small.");
}
};
Expand Down

0 comments on commit b23488d

Please sign in to comment.