mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibCrypto: Add the >= operator to UnsignedBigInteger
This commit is contained in:
parent
01c731aa59
commit
75d1ffea00
Notes:
sideshowbarker
2024-07-18 09:10:00 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/75d1ffea005 Pull-request: https://github.com/SerenityOS/serenity/pull/8663 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/linusg
2 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue