Merge pull request #100 from unknownbrackets/endian

Correct endian detection for UTF-16 and iOS buildfix
This commit is contained in:
Henrik Rydgård committed 2013-07-25 22:40:43 -07:00
commit 2ab8a3d120
2 files changed
+1 -7

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
#endif
#ifdef USING_GLES2
#if defined(USING_GLES2) && !defined(IOS)
PFNGLALPHAFUNCQCOMPROC glAlphaFuncQCOM;
#endif
-6
View File
@@ -2,14 +2,8 @@
#include "base/basictypes.h"
#if defined(__LITTLE_ENDIAN__)
#define UTF16_IS_LITTLE_ENDIAN 1
#elif defined(__BIG_ENDIAN__)
#define UTF16_IS_LITTLE_ENDIAN 0
#else
// Should optimize out.
#define UTF16_IS_LITTLE_ENDIAN (*(const uint16_t *)"\0\xff" >= 0x100)
#endif
template <bool is_little>
uint16_t UTF16_Swap(uint16_t u) {