1
0
Fork 0
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:
Tim Schumacher 2023-01-30 11:03:45 +01:00 committed by Linus Groh
parent 839bec14af
commit fa09152e23
Notes: sideshowbarker 2024-07-17 23:00:03 +09:00
4 changed files with 64 additions and 69 deletions

View file

@ -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;