47 #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) 48 #define WM_LITTLE_ENDIAN 49 #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) 52 #error "__BYTE_ORDER__ is not BIG or LITTLE endian" 57 #if !defined(WM_BIG_ENDIAN) && !defined(WM_LITTLE_ENDIAN) 58 #error "Cannot determine BIG or LITTLE endian." 59 #error "Please add to compilation options" 84 inline static uint32_t
swap32(uint32_t);
87 inline static uint64_t
swap64(uint64_t);
static uint32_t swap32(uint32_t)
Byte endian swapping for 32-bits.
static bool isLittle() noexcept
Runtime check for little endian.
static bool isBig() noexcept
Runtime check for big endian.
static uint64_t swap64(uint64_t)
Byte endian swapping for 64-bits.