diff --git a/include/wx/unichar.h b/include/wx/unichar.h index 43f8cc985e..07dda658dd 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -267,6 +267,12 @@ public: wxUniCharRef& operator=(const wxUniCharRef& c) { if (&c != this) *this = c.UniChar(); return *this; } +#if wxUSE_UNICODE_UTF8 + wxUniCharRef(const wxUniCharRef& that) : m_str(that.m_str), m_pos(that.m_pos) { } +#else + wxUniCharRef(const wxUniCharRef& that) : m_pos(that.m_pos) { } +#endif + #define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \ wxUniCharRef& operator=(type c) { return *this = wxUniChar(c); } wxDO_FOR_CHAR_INT_TYPES(wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL)