Codechange: Un-bitstuff all remaining commands.

This commit is contained in:
Michael Lutz
2021-11-23 01:05:58 +01:00
parent 58cff7b081
commit 13528bfcd0
40 changed files with 192 additions and 260 deletions

View File

@@ -14,6 +14,7 @@
#include <string_view>
#include "../core/span_type.hpp"
#include "../core/bitmath_func.hpp"
#include "../core/overflowsafe_type.hpp"
struct StrongTypedefBase;
@@ -37,6 +38,9 @@ public:
EndianBufferWriter &operator <<(std::string_view data) { this->Write(data); return *this; }
EndianBufferWriter &operator <<(bool data) { return *this << static_cast<byte>(data ? 1 : 0); }
template <typename T>
EndianBufferWriter &operator <<(const OverflowSafeInt<T> &data) { return *this << static_cast<T>(data); };
template <typename... Targs>
EndianBufferWriter &operator <<(const std::tuple<Targs...> &data)
{
@@ -127,6 +131,9 @@ public:
EndianBufferReader &operator >>(std::string &data) { data = this->ReadStr(); return *this; }
EndianBufferReader &operator >>(bool &data) { data = this->Read<byte>() != 0; return *this; }
template <typename T>
EndianBufferReader &operator >>(OverflowSafeInt<T> &data) { data = this->Read<T>(); return *this; };
template <typename... Targs>
EndianBufferReader &operator >>(std::tuple<Targs...> &data)
{