mirror of
https://github.com/libAthena/athena.git
synced 2025-06-10 00:23:31 +00:00
Extended bool with endian readers/writers
This commit is contained in:
parent
3d90c14795
commit
4eae909848
@ -490,6 +490,12 @@ public:
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline bool readVal(typename std::enable_if<std::is_same<T, bool>::value>::type* = 0)
|
inline bool readVal(typename std::enable_if<std::is_same<T, bool>::value>::type* = 0)
|
||||||
{return readBool();}
|
{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
|
/** @brief Reads an atVec2f (8 bytes), swaps to endianness specified by setEndian depending on platform
|
||||||
* and advances the current position
|
* and advances the current position
|
||||||
|
@ -375,6 +375,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline void writeBool(bool val) {writeUBytes((atUint8*)&val, 1);}
|
inline void writeBool(bool val) {writeUBytes((atUint8*)&val, 1);}
|
||||||
inline void writeVal(bool val) {writeBool(val);}
|
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.
|
/** @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.
|
* It also swaps the bytes depending on the platform and Stream settings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user