From 440d185666ff01c620b6a958184ae084c38999a7 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 16 Jul 2022 12:38:26 -0400 Subject: [PATCH] LibCrypto: Expose UnsignedBigInteger's is_zero() in SignedBigInteger Note we don't need to check the sign because negative zero became disallowed in b0d6399f60760e25a55ec9e8e95a1ad322b74b22. --- Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h index 3037e0d81c..78b6994446 100644 --- a/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -72,6 +72,7 @@ public: [[nodiscard]] UnsignedBigInteger const& unsigned_value() const { return m_unsigned_data; } [[nodiscard]] Vector const words() const { return m_unsigned_data.words(); } [[nodiscard]] bool is_negative() const { return m_sign; } + [[nodiscard]] bool is_zero() const { return m_unsigned_data.is_zero(); } void negate() {