mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
AK: Silence -Wimplicit-const-int-float-conversion in clamp_to_int
This commit is contained in:
parent
871485cc0d
commit
f87a488b22
1 changed files with 2 additions and 2 deletions
|
@ -1017,10 +1017,10 @@ constexpr T pow(T x, T y)
|
|||
template<typename T>
|
||||
constexpr int clamp_to_int(T value)
|
||||
{
|
||||
if (value >= NumericLimits<int>::max())
|
||||
if (value >= static_cast<T>(NumericLimits<int>::max()))
|
||||
return NumericLimits<int>::max();
|
||||
|
||||
if (value <= NumericLimits<int>::min())
|
||||
if (value <= static_cast<T>(NumericLimits<int>::min()))
|
||||
return NumericLimits<int>::min();
|
||||
|
||||
if constexpr (IsFloatingPoint<T>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue