summaryrefslogtreecommitdiff
path: root/AK/BufferStream.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-03 21:17:35 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-03 21:20:13 +0200
commit27f699ef0c8c2dce0f1dff19eef25f02e3da397e (patch)
tree52f95be1d05ba2a621d3bb8ac9129341f8d9973b /AK/BufferStream.h
parentc4c4bbc5ba5119e9ccc8ded948b26e7c4851a909 (diff)
downloadserenity-27f699ef0c8c2dce0f1dff19eef25f02e3da397e.zip
AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
Diffstat (limited to 'AK/BufferStream.h')
-rw-r--r--AK/BufferStream.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/AK/BufferStream.h b/AK/BufferStream.h
index 7edc9f6e65..0b8ad76f15 100644
--- a/AK/BufferStream.h
+++ b/AK/BufferStream.h
@@ -12,28 +12,28 @@ public:
{
}
- void operator<<(byte value)
+ void operator<<(u8 value)
{
m_buffer[m_offset++] = value & 0xffu;
}
void operator<<(char value)
{
- m_buffer[m_offset++] = (byte)value;
+ m_buffer[m_offset++] = (u8)value;
}
- void operator<<(word value)
+ void operator<<(u16 value)
{
m_buffer[m_offset++] = value & 0xffu;
- m_buffer[m_offset++] = (byte)(value >> 8) & 0xffu;
+ m_buffer[m_offset++] = (u8)(value >> 8) & 0xffu;
}
- void operator<<(dword value)
+ void operator<<(u32 value)
{
m_buffer[m_offset++] = value & 0xffu;
- m_buffer[m_offset++] = (byte)(value >> 8) & 0xffu;
- m_buffer[m_offset++] = (byte)(value >> 16) & 0xffu;
- m_buffer[m_offset++] = (byte)(value >> 24) & 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;
}
void operator<<(const StringView& value)
@@ -53,7 +53,7 @@ public:
return m_offset == m_buffer.size();
}
- void fill_to_end(byte ch)
+ void fill_to_end(u8 ch)
{
while (!at_end())
m_buffer[m_offset++] = ch;