Windows fix

This commit is contained in:
Jack Andersen 2018-08-19 10:07:25 -10:00
parent c40ee0531a
commit f898d7843a
1 changed files with 4 additions and 0 deletions

View File

@ -12,7 +12,11 @@
namespace athena::utility
{
inline bool isEmpty(atInt8* buf, atUint32 size) {return !memcmp(buf, buf + 1, size - 1);}
#if _WIN32
constexpr bool isSystemBigEndian() {return false;}
#else
constexpr bool isSystemBigEndian() {return __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__;}
#endif
inline constexpr ::athena::Endian SystemEndian = isSystemBigEndian() ? Big : Little;
inline constexpr ::athena::Endian NotSystemEndian = isSystemBigEndian() ? Little : Big;