Extended bool with endian readers/writers

This commit is contained in:
Jack Andersen 2015-09-24 14:55:11 -10:00
parent 3d90c14795
commit 4eae909848
2 changed files with 8 additions and 0 deletions

View File

@ -490,6 +490,12 @@ public:
template <class T>
inline bool readVal(typename std::enable_if<std::is_same<T, bool>::value>::type* = 0)
{return readBool();}
template <class T>
inline bool readValLittle(typename std::enable_if<std::is_same<T, bool>::value>::type* = 0)
{return readBool();}
template <class T>
inline bool readValBig(typename std::enable_if<std::is_same<T, bool>::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

View File

@ -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.