mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 00:20:21 +00:00
AK: Add BigEndianInputBitStream::bits_until_next_byte_boundary()
This commit is contained in:
parent
9ae17e3a7a
commit
cbfea68ed8
Notes:
sideshowbarker
2024-07-17 03:03:44 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/cbfea68ed8 Pull-request: https://github.com/SerenityOS/serenity/pull/23160
1 changed files with 1 additions and 0 deletions
|
@ -111,6 +111,7 @@ public:
|
|||
|
||||
/// Whether we are (accidentally or intentionally) at a byte boundary right now.
|
||||
ALWAYS_INLINE bool is_aligned_to_byte_boundary() const { return m_bit_offset % 8 == 0; }
|
||||
ALWAYS_INLINE u8 bits_until_next_byte_boundary() const { return m_bit_offset % 8 == 0 ? 0 : 8 - m_bit_offset; }
|
||||
|
||||
private:
|
||||
Optional<u8> m_current_byte;
|
||||
|
|
Loading…
Reference in a new issue