1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibCrypto: Add operator<= and operator>= to SignedBigInteger

This commit is contained in:
Idan Horowitz 2021-07-18 23:20:39 +03:00 committed by Linus Groh
parent 121e7626d0
commit ff6ca0f02d
2 changed files with 12 additions and 0 deletions

View file

@ -280,9 +280,19 @@ bool SignedBigInteger::operator<(const SignedBigInteger& other) const
return m_unsigned_data < other.m_unsigned_data;
}
bool SignedBigInteger::operator<=(const SignedBigInteger& other) const
{
return *this < other || *this == other;
}
bool SignedBigInteger::operator>(const SignedBigInteger& other) const
{
return *this != other && !(*this < other);
}
bool SignedBigInteger::operator>=(const SignedBigInteger& other) const
{
return !(*this < other);
}
}