From 63ffb39d041da8d441fd418120fac1c3a022e44a Mon Sep 17 00:00:00 2001 From: Matthew Bekkema Date: Sat, 20 Apr 2013 10:51:11 +1000 Subject: [PATCH] Fix build on big endian architectures --- src/cguittfont/irrUString.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/cguittfont/irrUString.h b/src/cguittfont/irrUString.h index f41fa1f7bf..2374c000b2 100644 --- a/src/cguittfont/irrUString.h +++ b/src/cguittfont/irrUString.h @@ -802,7 +802,7 @@ public: ustring16() : array(0), allocated(1), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -816,7 +816,7 @@ public: ustring16(const ustring16& other) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -830,7 +830,7 @@ public: ustring16(const string& other) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -845,7 +845,7 @@ public: ustring16(const std::basic_string& other) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -859,7 +859,7 @@ public: ustring16(Itr first, Itr last) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -878,7 +878,7 @@ public: ustring16(const char* const c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -893,7 +893,7 @@ public: ustring16(const char* const c, u32 length) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -908,7 +908,7 @@ public: ustring16(const uchar8_t* const c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -922,7 +922,7 @@ public: ustring16(const char c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -936,7 +936,7 @@ public: ustring16(const uchar8_t* const c, u32 length) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -950,7 +950,7 @@ public: ustring16(const uchar16_t* const c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -964,7 +964,7 @@ public: ustring16(const uchar16_t* const c, u32 length) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -978,7 +978,7 @@ public: ustring16(const uchar32_t* const c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -992,7 +992,7 @@ public: ustring16(const uchar32_t* const c, u32 length) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -1006,7 +1006,7 @@ public: ustring16(const wchar_t* const c) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE; @@ -1025,7 +1025,7 @@ public: ustring16(const wchar_t* const c, u32 length) : array(0), allocated(0), used(0) { -#if __BIG_ENDIAN__ +#ifdef __BIG_ENDIAN__ encoding = unicode::EUTFE_UTF16_BE; #else encoding = unicode::EUTFE_UTF16_LE;