]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xmlres.cpp
fixed typo
[wxWidgets.git] / contrib / src / xrc / xmlres.cpp
index 52d9881e13cf0e0d4b34996a009946d578aadde1..c29959f11905302f1fa82769666c9faed9711ef2 100644 (file)
@@ -283,19 +283,21 @@ static void ProcessPlatformProperty(wxXmlNode *node)
             while (tkn.HasMoreTokens())
             {
                 s = tkn.GetNextToken();
             while (tkn.HasMoreTokens())
             {
                 s = tkn.GetNextToken();
-                if (
 #ifdef __WXMSW__
 #ifdef __WXMSW__
-                    s == wxString(wxT("win"))
-#elif defined(__UNIX__)
-                    s == wxString(wxT("unix"))
-#elif defined(__MAC__)
-                    s == wxString(wxT("mac"))
-#elif defined(__OS2__)
-                    s == wxString(wxT("os2"))
-#else
-                    FALSE
+                if (s == wxT("win")) isok = true;
+#endif
+#ifdef __UNIX__
+                if (s == wxT("unix")) isok = true;
+#endif
+#ifdef __MAC__
+                if (s == wxT("mac")) isok = true;
 #endif
 #endif
-              ) isok = TRUE;
+#ifdef __OS2__
+                if (s == wxT("os2")) isok = true;
+#endif
+
+                if (isok)
+                    break;
             }
         }
 
             }
         }
 
@@ -866,7 +868,8 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
     wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
     if (fsfile == NULL)
     {
     wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
     if (fsfile == NULL)
     {
-        wxLogError(_("XRC resource: Cannot create bitmap from '%s'."), param.c_str());
+        wxLogError(_("XRC resource: Cannot create bitmap from '%s'."),
+                   name.c_str());
         return wxNullBitmap;
     }
     wxImage img(*(fsfile->GetStream()));
         return wxNullBitmap;
     }
     wxImage img(*(fsfile->GetStream()));
@@ -1223,7 +1226,10 @@ static void CleanXRCID_Record(XRCID_record *rec)
 static void CleanXRCID_Records()
 {
     for (int i = 0; i < XRCID_TABLE_SIZE; i++)
 static void CleanXRCID_Records()
 {
     for (int i = 0; i < XRCID_TABLE_SIZE; i++)
+    {
         CleanXRCID_Record(XRCID_Records[i]);
         CleanXRCID_Record(XRCID_Records[i]);
+        XRCID_Records[i] = NULL;
+    }
 }
 
 static void AddStdXRCID_Records()
 }
 
 static void AddStdXRCID_Records()
@@ -1283,5 +1289,3 @@ void wxXmlInitResourceModule()
     module->Init();
     wxModule::RegisterModule(module);
 }
     module->Init();
     wxModule::RegisterModule(module);
 }
-
-