1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

AK: Remove the fallbile constructor from BigEndianOutputBitStream

This commit is contained in:
Tim Schumacher 2023-01-30 11:04:48 +01:00 committed by Linus Groh
parent 261d62438f
commit 0fee97916b
2 changed files with 12 additions and 17 deletions

View file

@ -225,9 +225,9 @@ private:
/// in big-endian order to another stream.
class BigEndianOutputBitStream : public Stream {
public:
static ErrorOr<NonnullOwnPtr<BigEndianOutputBitStream>> construct(MaybeOwned<Stream> stream)
explicit BigEndianOutputBitStream(MaybeOwned<Stream> stream)
: m_stream(move(stream))
{
return adopt_nonnull_own_or_enomem<BigEndianOutputBitStream>(new BigEndianOutputBitStream(move(stream)));
}
virtual ErrorOr<Bytes> read(Bytes) override
@ -294,11 +294,6 @@ public:
}
private:
BigEndianOutputBitStream(MaybeOwned<Stream> stream)
: m_stream(move(stream))
{
}
MaybeOwned<Stream> m_stream;
u8 m_current_byte { 0 };
size_t m_bit_offset { 0 };