From ac16008d09e2db84540b5b2f4e2d2f320becfe0a Mon Sep 17 00:00:00 2001 From: devgianlu Date: Mon, 21 Apr 2025 12:02:43 +0200 Subject: [PATCH] LibCrypto: Remove unused `create_invalid` method on `UnsignedBigInteger` --- Libraries/LibCrypto/BigInt/SignedBigInteger.h | 5 ----- Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp | 7 ------- Libraries/LibCrypto/BigInt/UnsignedBigInteger.h | 2 -- 3 files changed, 14 deletions(-) diff --git a/Libraries/LibCrypto/BigInt/SignedBigInteger.h b/Libraries/LibCrypto/BigInt/SignedBigInteger.h index 75203588257..cb80d644953 100644 --- a/Libraries/LibCrypto/BigInt/SignedBigInteger.h +++ b/Libraries/LibCrypto/BigInt/SignedBigInteger.h @@ -52,11 +52,6 @@ public: { } - [[nodiscard]] static SignedBigInteger create_invalid() - { - return { UnsignedBigInteger::create_invalid(), false }; - } - [[nodiscard]] static SignedBigInteger import_data(StringView data) { return import_data((u8 const*)data.characters_without_null_termination(), data.length()); } [[nodiscard]] static SignedBigInteger import_data(u8 const* ptr, size_t length); diff --git a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp index e7d4fada1af..62ed0f4df89 100644 --- a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp +++ b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.cpp @@ -97,13 +97,6 @@ UnsignedBigInteger::UnsignedBigInteger(double value) VERIFY(raw_mantissa == 0); } -UnsignedBigInteger UnsignedBigInteger::create_invalid() -{ - UnsignedBigInteger invalid(0); - invalid.invalidate(); - return invalid; -} - size_t UnsignedBigInteger::export_data(Bytes data, bool remove_leading_zeros) const { size_t word_count = trimmed_length(); diff --git a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h index 7a9997f18b6..79952aa83a0 100644 --- a/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h +++ b/Libraries/LibCrypto/BigInt/UnsignedBigInteger.h @@ -55,8 +55,6 @@ public: UnsignedBigInteger() = default; - [[nodiscard]] static UnsignedBigInteger create_invalid(); - [[nodiscard]] static UnsignedBigInteger import_data(StringView data) { return import_data((u8 const*)data.characters_without_null_termination(), data.length()); } [[nodiscard]] static UnsignedBigInteger import_data(u8 const* ptr, size_t length) {