mirror of https://github.com/libAthena/athena.git
Extended bool with endian readers/writers
This commit is contained in:
parent
3d90c14795
commit
4eae909848
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue