-
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
-
- const wxChar *i;
- wxChar *o;
-
- if (m_UnicodeInput)
- for (i = input, o = output; *i != 0; i++, o++)
- *o = (wxChar)(m_Table[(wxUint16)*i]);
- else
- for (i = input, o = output; *i != 0; i++, o++)
- *o = (wxChar)(m_Table[(wxUint8)*i]);
+
+ wxCHECK_RET(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+
+ for (i = input, o = output; *i != 0;)
+ *(o++) = (char)(m_Table[(wxUint8)*(i++)]);