X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bfb6847df68d5d048749a83d04f1fda0188ab9d2..e82b00a76d14e0c8717cce0ed7523047e6359352:/include/wx/stringops.h diff --git a/include/wx/stringops.h b/include/wx/stringops.h index f3046794be..b8ba8abd74 100644 --- a/include/wx/stringops.h +++ b/include/wx/stringops.h @@ -140,15 +140,10 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8 return dist; } - // buffer for single UTF-8 character - struct Utf8CharBuffer - { - char data[5]; - operator const char*() const { return data; } - }; - // encodes the character as UTF-8: - static Utf8CharBuffer EncodeChar(const wxUniChar& ch); + typedef wxUniChar::Utf8CharBuffer Utf8CharBuffer; + static Utf8CharBuffer EncodeChar(const wxUniChar& ch) + { return ch.AsUTF8(); } // returns n copies of ch encoded in UTF-8 string static wxCharBuffer EncodeNChars(size_t n, const wxUniChar& ch);