]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
removed read() declaration which resulted in a warning
[wxWidgets.git] / src / xrc / xmlres.cpp
index 79d0ef314af365f89cbaca41a40e3db9756708a4..8064dd94703f37f23aecebeb2381073dc48e58a4 100644 (file)
@@ -210,7 +210,7 @@ bool wxXmlResource::AttachUnknownControl(const wxString& name,
 }
 
 
 }
 
 
-void wxXmlResource::ProcessPlatformProperty(wxXmlNode *node)
+static void ProcessPlatformProperty(wxXmlNode *node)
 {
     wxString s;
     bool isok;
 {
     wxString s;
     bool isok;
@@ -245,14 +245,17 @@ void wxXmlResource::ProcessPlatformProperty(wxXmlNode *node)
         }
 
         if (isok)
         }
 
         if (isok)
+        {
             ProcessPlatformProperty(c);
             ProcessPlatformProperty(c);
+            c = c->GetNext();
+        }
         else
         {
             node->RemoveChild(c);
         else
         {
             node->RemoveChild(c);
+            wxXmlNode *c2 = c->GetNext();
             delete c;
             delete c;
+            c = c2;
         }
         }
-
-        c = c->GetNext();
     }
 }
 
     }
 }
 
@@ -805,8 +808,10 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
     wxString encoding = GetParamValue(wxT("encoding"));
     wxFontMapper mapper;
     wxFontEncoding enc = wxFONTENCODING_DEFAULT;
     wxString encoding = GetParamValue(wxT("encoding"));
     wxFontMapper mapper;
     wxFontEncoding enc = wxFONTENCODING_DEFAULT;
-    if (!encoding.IsEmpty()) enc = mapper.CharsetToEncoding(encoding);
-    if (enc == wxFONTENCODING_SYSTEM) enc = wxFONTENCODING_SYSTEM;
+    if (!encoding.IsEmpty())
+        enc = mapper.CharsetToEncoding(encoding);
+    if (enc == wxFONTENCODING_SYSTEM)
+        enc = wxFONTENCODING_DEFAULT;
 
     wxString faces = GetParamValue(wxT("face"));
     wxString facename = wxEmptyString;
 
     wxString faces = GetParamValue(wxT("face"));
     wxString facename = wxEmptyString;