diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-07-14 00:12:54 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-14 15:29:59 +0200 |
commit | 379288321912b31b92e73f688e3cbe6ee788eeeb (patch) | |
tree | f9900a78add7564b4a9c9af20c1c92c08c38b8a9 /AK/BufferStream.h | |
parent | e78097d14028da4e5139e7187c3e52fe38cdaf99 (diff) | |
download | serenity-379288321912b31b92e73f688e3cbe6ee788eeeb.zip |
AK: Remove some superstition from BufferStream :)
Diffstat (limited to 'AK/BufferStream.h')
-rw-r--r-- | AK/BufferStream.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/AK/BufferStream.h b/AK/BufferStream.h index 0b8ad76f15..0076eb2125 100644 --- a/AK/BufferStream.h +++ b/AK/BufferStream.h @@ -14,7 +14,7 @@ public: void operator<<(u8 value) { - m_buffer[m_offset++] = value & 0xffu; + m_buffer[m_offset++] = value; } void operator<<(char value) @@ -24,16 +24,16 @@ public: void operator<<(u16 value) { - m_buffer[m_offset++] = value & 0xffu; - m_buffer[m_offset++] = (u8)(value >> 8) & 0xffu; + m_buffer[m_offset++] = value; + m_buffer[m_offset++] = (u8)(value >> 8); } void operator<<(u32 value) { - m_buffer[m_offset++] = value & 0xffu; - m_buffer[m_offset++] = (u8)(value >> 8) & 0xffu; - m_buffer[m_offset++] = (u8)(value >> 16) & 0xffu; - m_buffer[m_offset++] = (u8)(value >> 24) & 0xffu; + m_buffer[m_offset++] = value; + m_buffer[m_offset++] = (u8)(value >> 8); + m_buffer[m_offset++] = (u8)(value >> 16); + m_buffer[m_offset++] = (u8)(value >> 24); } void operator<<(const StringView& value) |