From 22a59b3912ff5e7bb1516faa06f1841545a8117c Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 3 Nov 2013 17:28:16 +0100 Subject: Fix win32/msvc i18n (quite UGLY version, blame Microsoft) --- src/cguittfont/irrUString.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/cguittfont') diff --git a/src/cguittfont/irrUString.h b/src/cguittfont/irrUString.h index f41fa1f7b..21109ea48 100644 --- a/src/cguittfont/irrUString.h +++ b/src/cguittfont/irrUString.h @@ -205,6 +205,10 @@ inline core::array getUnicodeBOM(EUTF_ENCODE mode) case EUTFE_UTF32_LE: COPY_ARRAY(BOM_ENCODE_UTF32_LE, BOM_ENCODE_UTF32_LEN); break; + case EUTFE_NONE: + // TODO sapier: fixed warning only, + // don't know if something needs to be done here + break; } return ret; @@ -257,7 +261,7 @@ public: _set(c); return *this; } - + //! Increments the value by 1. //! \return Myself. _ustring16_iterator_access& operator++() @@ -392,7 +396,7 @@ public: return unicode::toUTF32(a[pos], a[pos + 1]); } } - + //! Sets a uchar32_t at our current position. void _set(uchar32_t c) { @@ -707,7 +711,6 @@ public: //! Moves the iterator to the end of the string. void toEnd() { - const uchar16_t* a = ref->c_str(); pos = ref->size_raw(); } @@ -732,12 +735,13 @@ public: typedef typename _Base::const_pointer const_pointer; typedef typename _Base::const_reference const_reference; + typedef typename _Base::value_type value_type; typedef typename _Base::difference_type difference_type; typedef typename _Base::distance_type distance_type; typedef access pointer; typedef access reference; - + using _Base::pos; using _Base::ref; @@ -2096,7 +2100,7 @@ public: } #endif - + //! Appends a number to this ustring16. //! \param c Number to append. //! \return A reference to our current string. @@ -2958,7 +2962,7 @@ public: if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian) { for (u32 i = 0; i <= used; ++i) - *ptr++ = unicode::swapEndian16(*ptr); + ptr[i] = unicode::swapEndian16(ptr[i]); } ret.set_used(used + (addBOM ? unicode::BOM_UTF16_LEN : 0)); ret.push_back(0); -- cgit v1.2.3