compile-time system endian check

This commit is contained in:
Jack Andersen
2015-07-12 06:51:04 -10:00
parent 7ef451c86a
commit 7ec5a5971a
2 changed files with 1 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ namespace Athena
namespace utility
{
inline bool isEmpty(atInt8* buf, atUint32 size) {return !memcmp(buf, buf + 1, size - 1);}
bool isSystemBigEndian();
inline bool isSystemBigEndian() {return (*(atUint16*)"\xFE\xFF" == 0xFEFF);}
inline atInt16 swap16(atInt16 val)
{