mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +00:00
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.
This commit is contained in:
parent
143465b23a
commit
6124050187
1 changed files with 6 additions and 6 deletions
|
@ -135,32 +135,32 @@ public:
|
|||
return m_low || m_high;
|
||||
}
|
||||
template<Unsigned U>
|
||||
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<Unsigned U>
|
||||
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<Unsigned U>
|
||||
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<Unsigned U>
|
||||
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<Unsigned U>
|
||||
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<Unsigned U>
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue