From f87a488b222af514038b9b24dea758350bfc907d Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 7 Aug 2023 14:45:43 -0600 Subject: [PATCH] AK: Silence -Wimplicit-const-int-float-conversion in clamp_to_int --- AK/Math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Math.h b/AK/Math.h index 185a4c2a700..501d1e66415 100644 --- a/AK/Math.h +++ b/AK/Math.h @@ -1017,10 +1017,10 @@ constexpr T pow(T x, T y) template constexpr int clamp_to_int(T value) { - if (value >= NumericLimits::max()) + if (value >= static_cast(NumericLimits::max())) return NumericLimits::max(); - if (value <= NumericLimits::min()) + if (value <= static_cast(NumericLimits::min())) return NumericLimits::min(); if constexpr (IsFloatingPoint)