LibCrypto: Add the >= operator to UnsignedBigInteger

This commit is contained in:
Idan Horowitz 2021-07-11 23:48:40 +03:00 committed by Linus Groh
parent 01c731aa59
commit 75d1ffea00
Notes: sideshowbarker 2024-07-18 09:10:00 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -337,6 +337,11 @@ bool UnsignedBigInteger::operator>(const UnsignedBigInteger& other) const
return *this != other && !(*this < other);
}
bool UnsignedBigInteger::operator>=(UnsignedBigInteger const& other) const
{
return *this > other || *this == other;
}
}
void AK::Formatter<Crypto::UnsignedBigInteger>::format(FormatBuilder& fmtbuilder, const Crypto::UnsignedBigInteger& value)

View file

@ -99,6 +99,7 @@ public:
bool operator!=(const UnsignedBigInteger& other) const;
bool operator<(const UnsignedBigInteger& other) const;
bool operator>(const UnsignedBigInteger& other) const;
bool operator>=(UnsignedBigInteger const& other) const;
private:
friend class UnsignedBigIntegerAlgorithms;