]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
Allow building wxProtocol without wxUSE_SOCKETS
[wxWidgets.git] / src / common / strconv.cpp
index d613e6174a6757be60d4931bd05f7ab7f43ab733..bdb210d538f727f131c99d5f2dcaf9805b027686 100644 (file)
@@ -66,7 +66,9 @@ public:
     virtual bool OnInit() { return TRUE; }
     virtual void OnExit()
     {
+#if wxUSE_WCHAR_T
         wxConvLocal.Clear();
+#endif
     }
 
     DECLARE_DYNAMIC_CLASS(wxStrConvModule)
@@ -789,7 +791,7 @@ public:
                                      enc(wxFONTENCODING_SYSTEM)
     {
         if (name)
-            enc = wxTheFontMapper->CharsetToEncoding(name, FALSE);
+            enc = wxFontMapper::Get()->CharsetToEncoding(name, FALSE);
 
         m_ok = m2w.Init(enc, wxFONTENCODING_UNICODE) &&
                w2m.Init(wxFONTENCODING_UNICODE, enc);
@@ -838,7 +840,7 @@ static wxCharacterSet *wxGetCharacterSet(const wxChar *name)
 {
     // check for the special case of ASCII charset
 #if wxUSE_FONTMAP
-    if ( wxTheFontMapper->CharsetToEncoding(name) == wxFONTENCODING_DEFAULT )
+    if ( wxFontMapper::Get()->CharsetToEncoding(name) == wxFONTENCODING_DEFAULT )
 #else // wxUSE_FONTMAP
     if ( !name )
 #endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
@@ -918,6 +920,20 @@ wxCSConv::~wxCSConv()
     Clear();
 }
 
+wxCSConv::wxCSConv(const wxCSConv& conv)
+    : wxMBConv()
+{
+    Clear();
+    SetName(conv.m_name);
+}
+
+wxCSConv& wxCSConv::operator=(const wxCSConv& conv)
+{
+    Clear();
+    SetName(conv.m_name);
+    return *this;
+}
+
 void wxCSConv::Clear()
 {
     if (m_name)