diff options
-rw-r--r-- | AK/BufferStream.h | 37 | ||||
-rw-r--r-- | DevTools/IPCCompiler/main.cpp | 6 |
2 files changed, 3 insertions, 40 deletions
diff --git a/AK/BufferStream.h b/AK/BufferStream.h index 653e36dc86..b9f2990877 100644 --- a/AK/BufferStream.h +++ b/AK/BufferStream.h @@ -297,43 +297,6 @@ public: return *this; } - BufferStream& operator<<(size_t value) - { - if constexpr(sizeof(size_t) == 4) - return *this << (u32)value; - else if constexpr(sizeof(size_t) == 8) - return *this << (u64)value; - ASSERT_NOT_REACHED(); - } - BufferStream& operator>>(size_t& value) - { - if constexpr(sizeof(size_t) == 4) - return *this >> (u32&)value; - else if constexpr(sizeof(size_t) == 8) - return *this >> (u64&)value; - ASSERT_NOT_REACHED(); - } - -#ifndef __i386__ - BufferStream& operator<<(ssize_t value) - { - if constexpr(sizeof(ssize_t) == 4) - return *this << (i32)value; - else if constexpr(sizeof(ssize_t) == 8) - return *this << (i64)value; - ASSERT_NOT_REACHED(); - } - BufferStream& operator>>(ssize_t& value) - { - if constexpr(sizeof(ssize_t) == 4) - return *this >> (i32&)value; - else if constexpr(sizeof(ssize_t) == 8) - return *this >> (i64&)value; - ASSERT_NOT_REACHED(); - } -#endif - - BufferStream& operator<<(const char* value) { return *this << StringView(value); diff --git a/DevTools/IPCCompiler/main.cpp b/DevTools/IPCCompiler/main.cpp index fcfcc18422..add0a44817 100644 --- a/DevTools/IPCCompiler/main.cpp +++ b/DevTools/IPCCompiler/main.cpp @@ -310,11 +310,11 @@ int main(int argc, char** argv) dbg() << " " << parameter.type << " " << parameter.name << " = " << initial_value << ";"; if (parameter.type == "String") { - dbg() << " size_t " << parameter.name << "_length = 0;"; + dbg() << " u32 " << parameter.name << "_length = 0;"; dbg() << " stream >> " << parameter.name << "_length;"; dbg() << " if (" << parameter.name << "_length == 0) {"; dbg() << " " << parameter.name << " = String::empty();"; - dbg() << " } else if ((ssize_t)" << parameter.name << "_length == -1) {"; + dbg() << " } else if ((i32)" << parameter.name << "_length == -1) {"; dbg() << " " << parameter.name << " = String();"; dbg() << " } else {"; dbg() << " char* " << parameter.name << "_buffer = nullptr;"; @@ -395,7 +395,7 @@ int main(int argc, char** argv) for (auto& parameter : parameters) { if (parameter.type == "String") { dbg() << " if (m_" << parameter.name << ".is_null()) {"; - dbg() << " stream << (ssize_t)-1;"; + dbg() << " stream << (i32)-1;"; dbg() << " } else {"; dbg() << " stream << m_" << parameter.name << ".length();"; dbg() << " stream << m_" << parameter.name << ";"; |