mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibCrypto: Define UnsignedBigInteger::operator<=
We have all comparison operators except less-than-or-equal already.
This commit is contained in:
parent
63a5717bc7
commit
e236f1d2ae
Notes:
github-actions[bot]
2024-11-21 00:07:11 +00:00
Author: https://github.com/trflynn89
Commit: e236f1d2ae
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2431
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/shannonbooth ✅
2 changed files with 6 additions and 0 deletions
|
@ -601,6 +601,11 @@ bool UnsignedBigInteger::operator<(UnsignedBigInteger const& other) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool UnsignedBigInteger::operator<=(UnsignedBigInteger const& other) const
|
||||||
|
{
|
||||||
|
return *this < other || *this == other;
|
||||||
|
}
|
||||||
|
|
||||||
bool UnsignedBigInteger::operator>(UnsignedBigInteger const& other) const
|
bool UnsignedBigInteger::operator>(UnsignedBigInteger const& other) const
|
||||||
{
|
{
|
||||||
return *this != other && !(*this < other);
|
return *this != other && !(*this < other);
|
||||||
|
|
|
@ -128,6 +128,7 @@ public:
|
||||||
[[nodiscard]] bool operator==(UnsignedBigInteger const& other) const;
|
[[nodiscard]] bool operator==(UnsignedBigInteger const& other) const;
|
||||||
[[nodiscard]] bool operator!=(UnsignedBigInteger const& other) const;
|
[[nodiscard]] bool operator!=(UnsignedBigInteger const& other) const;
|
||||||
[[nodiscard]] bool operator<(UnsignedBigInteger const& other) const;
|
[[nodiscard]] bool operator<(UnsignedBigInteger const& other) const;
|
||||||
|
[[nodiscard]] bool operator<=(UnsignedBigInteger const& other) const;
|
||||||
[[nodiscard]] bool operator>(UnsignedBigInteger const& other) const;
|
[[nodiscard]] bool operator>(UnsignedBigInteger const& other) const;
|
||||||
[[nodiscard]] bool operator>=(UnsignedBigInteger const& other) const;
|
[[nodiscard]] bool operator>=(UnsignedBigInteger const& other) const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue