diff --git a/AK/FixedPoint.h b/AK/FixedPoint.h index 91d05af7dfb..dbb268caf8a 100644 --- a/AK/FixedPoint.h +++ b/AK/FixedPoint.h @@ -18,19 +18,19 @@ namespace AK { template class FixedPoint { using This = FixedPoint; - constexpr static Underlying radix_mask = (1 << precision) - 1; + constexpr static Underlying radix_mask = (static_cast(1) << precision) - 1; public: constexpr FixedPoint() = default; template constexpr FixedPoint(I value) - : m_value(value << precision) + : m_value(static_cast(value) << precision) { } template constexpr FixedPoint(F value) - : m_value(static_cast(value * (1u << precision))) + : m_value(static_cast(value * (static_cast(1) << precision))) { }