]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxrc/wxrc.cpp
BIG CHANGE: added parsing of base classes; now CompareClasses() is much smarter since...
[wxWidgets.git] / utils / wxrc / wxrc.cpp
index 4d100f4f3b496ce6945d587f2f6476d898642890..fef806dec4516408526bfb93e25d5d81dca59d6c 100644 (file)
@@ -581,7 +581,8 @@ static wxString FileToCppArray(wxString filename, int num)
     wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
 
     const size_t lng = wx_truncate_cast(size_t, offset);
-    wxASSERT_MSG( lng == offset, wxT("Huge file not supported") );
+    wxASSERT_MSG( wx_static_cast(wxFileOffset, lng) == offset,
+                  wxT("Huge file not supported") );
 
     snum.Printf(_T("%i"), num);
     output.Printf(_T("static size_t xml_res_size_") + snum + _T(" = %i;\n"), lng);
@@ -673,12 +674,17 @@ void XmlResApp::MakePackageCPP(const wxArrayString& flist)
         wxString ext = wxFileName(flist[i]).GetExt();
         if ( ext.Lower() == _T("xrc") )
             mime = _T("text/xml");
+#if wxUSE_MIMETYPE
         else
         {
             wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext);
             if ( ft )
+            {
                 ft->GetMimeType(&mime);
+                delete ft;
+            }
         }
+#endif // wxUSE_MIMETYPE
 
         s.Printf("    XRC_ADD_FILE(wxT(\"XRC_resource/" + flist[i] +
                  "\"), xml_res_file_%i, xml_res_size_%i, _T(\"%s\"));\n",
@@ -729,7 +735,8 @@ static wxString FileToPythonArray(wxString filename, int num)
     wxASSERT_MSG( offset >= 0 , wxT("Invalid file length") );
 
     const size_t lng = wx_truncate_cast(size_t, offset);
-    wxASSERT_MSG( offset == lng, wxT("Huge file not supported") );
+    wxASSERT_MSG( wx_static_cast(wxFileOffset, lng) == offset,
+                  wxT("Huge file not supported") );
 
     snum.Printf(_T("%i"), num);
     output = "    xml_res_file_" + snum + " = '''\\\n";