From 4eae90984823ca9bfb039e652194ec2d068a3ee2 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 24 Sep 2015 14:55:11 -1000 Subject: [PATCH] Extended bool with endian readers/writers --- include/Athena/IStreamReader.hpp | 6 ++++++ include/Athena/IStreamWriter.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/include/Athena/IStreamReader.hpp b/include/Athena/IStreamReader.hpp index 0864cf8..27f79dc 100644 --- a/include/Athena/IStreamReader.hpp +++ b/include/Athena/IStreamReader.hpp @@ -490,6 +490,12 @@ public: template inline bool readVal(typename std::enable_if::value>::type* = 0) {return readBool();} + template + inline bool readValLittle(typename std::enable_if::value>::type* = 0) + {return readBool();} + template + inline bool readValBig(typename std::enable_if::value>::type* = 0) + {return readBool();} /** @brief Reads an atVec2f (8 bytes), swaps to endianness specified by setEndian depending on platform * and advances the current position diff --git a/include/Athena/IStreamWriter.hpp b/include/Athena/IStreamWriter.hpp index 34a8e6a..7468589 100644 --- a/include/Athena/IStreamWriter.hpp +++ b/include/Athena/IStreamWriter.hpp @@ -375,6 +375,8 @@ public: */ inline void writeBool(bool val) {writeUBytes((atUint8*)&val, 1);} inline void writeVal(bool val) {writeBool(val);} + inline void writeValLittle(bool val) {writeBool(val);} + inline void writeValBig(bool val) {writeBool(val);} /** @brief Writes an atVec2f (8 bytes) to the buffer and advances the buffer. * It also swaps the bytes depending on the platform and Stream settings.