mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Remove the fallible constructor from BigEndianInputBitStream
This commit is contained in:
parent
839bec14af
commit
fa09152e23
Notes:
sideshowbarker
2024-07-17 23:00:03 +09:00
Author: https://github.com/timschumi
Commit: fa09152e23
Pull-request: https://github.com/SerenityOS/serenity/pull/17264
4 changed files with 64 additions and 69 deletions
|
@ -17,9 +17,9 @@ namespace AK {
|
|||
/// in big-endian order from another stream.
|
||||
class BigEndianInputBitStream : public Stream {
|
||||
public:
|
||||
static ErrorOr<NonnullOwnPtr<BigEndianInputBitStream>> construct(MaybeOwned<Stream> stream)
|
||||
explicit BigEndianInputBitStream(MaybeOwned<Stream> stream)
|
||||
: m_stream(move(stream))
|
||||
{
|
||||
return adopt_nonnull_own_or_enomem<BigEndianInputBitStream>(new BigEndianInputBitStream(move(stream)));
|
||||
}
|
||||
|
||||
// ^Stream
|
||||
|
@ -112,11 +112,6 @@ public:
|
|||
ALWAYS_INLINE bool is_aligned_to_byte_boundary() const { return m_bit_offset == 0; }
|
||||
|
||||
private:
|
||||
BigEndianInputBitStream(MaybeOwned<Stream> stream)
|
||||
: m_stream(move(stream))
|
||||
{
|
||||
}
|
||||
|
||||
Optional<u8> m_current_byte;
|
||||
size_t m_bit_offset { 0 };
|
||||
MaybeOwned<Stream> m_stream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue