From 6124050187b5bd11532829ce1ef7559cccca4143 Mon Sep 17 00:00:00 2001 From: B0IIZZ <70597779+b0iizz@users.noreply.github.com> Date: Sat, 1 Jan 2022 22:21:19 +0100 Subject: [PATCH] AK: Fix UFixedBigInt comparison operators Instead of using the specified type U like we want, we were using the type T all along when comparing with smaller integers. This is now fixed. --- AK/UFixedBigInt.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AK/UFixedBigInt.h b/AK/UFixedBigInt.h index 52f02971d3..cc35324c8e 100644 --- a/AK/UFixedBigInt.h +++ b/AK/UFixedBigInt.h @@ -135,32 +135,32 @@ public: return m_low || m_high; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator==(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator==(const U& other) const { return !m_high && m_low == other; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator!=(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator!=(const U& other) const { return m_high || m_low != other; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator>(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator>(const U& other) const { return m_high || m_low > other; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator<(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator<(const U& other) const { return !m_high && m_low < other; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator>=(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator>=(const U& other) const { return *this == other || *this > other; } template - requires(sizeof(T) >= sizeof(U)) constexpr bool operator<=(const T& other) const + requires(sizeof(T) >= sizeof(U)) constexpr bool operator<=(const U& other) const { return *this == other || *this < other; }