summaryrefslogtreecommitdiff
path: root/AK/BufferStream.h
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-07-14 00:12:54 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-14 15:29:59 +0200
commit379288321912b31b92e73f688e3cbe6ee788eeeb (patch)
treef9900a78add7564b4a9c9af20c1c92c08c38b8a9 /AK/BufferStream.h
parente78097d14028da4e5139e7187c3e52fe38cdaf99 (diff)
downloadserenity-379288321912b31b92e73f688e3cbe6ee788eeeb.zip
AK: Remove some superstition from BufferStream :)
Diffstat (limited to 'AK/BufferStream.h')
-rw-r--r--AK/BufferStream.h14
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)