X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03424b1b897ff207c3fefc8d9af47ed2f0f9cb05..7aa5864467bf0bb220fdc447876f13f178ae8f35:/src/common/encconv.cpp diff --git a/src/common/encconv.cpp b/src/common/encconv.cpp index d4f8aebebe..a266d02c91 100644 --- a/src/common/encconv.cpp +++ b/src/common/encconv.cpp @@ -18,6 +18,8 @@ #pragma hdrstop #endif +#if wxUSE_FONTMAP + #include "wx/encconv.h" #include @@ -138,7 +140,8 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e else { CharsetItem *rev = BuildReverseTable(out_tbl); - CharsetItem *item, key; + CharsetItem *item; + CharsetItem key; for (i = 0; i < 128; i++) { @@ -150,7 +153,11 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e if (item) m_Table[128 + i] = (tchar)item -> c; else - m_Table[128 + i] = 128 + i; // don't know => don't touch +#if wxUSE_WCHAR_T + m_Table[128 + i] = (wchar_t)(128 + i); +#else + m_Table[128 + i] = (char)(128 + i); +#endif } delete[] rev; @@ -437,3 +444,5 @@ wxFontEncodingArray wxEncodingConverter::GetAllEquivalents(wxFontEncoding enc) return arr; } + +#endif // wxUSE_FONTMAP