]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/encconv.cpp
made GetColourFromGTKWidget() more general, it is now used for all colours
[wxWidgets.git] / src / common / encconv.cpp
index d4f8aebebeb3b3137688cbeebe00094d85de457a..a266d02c918e6a670dba6ab5efa357b0227d5b57 100644 (file)
@@ -18,6 +18,8 @@
   #pragma hdrstop
 #endif
 
+#if wxUSE_FONTMAP
+
 #include "wx/encconv.h"
 
 #include <stdlib.h>
@@ -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