mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibCrypto: Introduce a falible API for SignedBigInteger::shift_left
This commit is contained in:
Notes:
github-actions[bot]
2025-02-19 14:02:02 +00:00
Author: https://github.com/ttrssreal Commit: https://github.com/LadybirdBrowser/ladybird/commit/8fda05d8b79 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3615
@@ -276,9 +276,14 @@ bool SignedBigInteger::operator>(UnsignedBigInteger const& other) const
|
||||
return *this != other && !(*this < other);
|
||||
}
|
||||
|
||||
FLATTEN ErrorOr<SignedBigInteger> SignedBigInteger::try_shift_left(size_t num_bits) const
|
||||
{
|
||||
return SignedBigInteger { TRY(m_unsigned_data.try_shift_left(num_bits)), m_sign };
|
||||
}
|
||||
|
||||
FLATTEN SignedBigInteger SignedBigInteger::shift_left(size_t num_bits) const
|
||||
{
|
||||
return SignedBigInteger { m_unsigned_data.shift_left(num_bits), m_sign };
|
||||
return MUST(try_shift_left(num_bits));
|
||||
}
|
||||
|
||||
FLATTEN SignedBigInteger SignedBigInteger::shift_right(size_t num_bits) const
|
||||
|
||||
Reference in New Issue
Block a user