1
0
mirror of https://github.com/Rogiel/PacketBuffer synced 2025-12-06 00:13:04 +00:00

Removes an unecessary byte-order swapping for bool types that caused problems when compiling with Boost 1.71

This commit is contained in:
2019-08-20 15:04:22 -03:00
parent a74673e904
commit 37e76659ea
2 changed files with 0 additions and 2 deletions

View File

@@ -291,7 +291,6 @@ namespace PacketBuffer {
*/ */
inline Packer& pack(bool b) { inline Packer& pack(bool b) {
static_assert(sizeof(b) == 1, "bool size must be 1 byte"); static_assert(sizeof(b) == 1, "bool size must be 1 byte");
boost::endian::conditional_reverse_inplace<boost::endian::order::native, Endianess>(b);
return pack(reinterpret_cast<const char*>(&b), sizeof(b)); return pack(reinterpret_cast<const char*>(&b), sizeof(b));
} }

View File

@@ -290,7 +290,6 @@ namespace PacketBuffer {
Unpacker& unpack(bool& b) { Unpacker& unpack(bool& b) {
static_assert(sizeof(b) == 1, "bool size must be 1 byte"); static_assert(sizeof(b) == 1, "bool size must be 1 byte");
unpack(reinterpret_cast<char*>(&b), sizeof(b)); unpack(reinterpret_cast<char*>(&b), sizeof(b));
boost::endian::conditional_reverse_inplace<Endianess, boost::endian::order::native>(b);
return *this; return *this;
} }