X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaa66113dfa36c1636a646e3feb748c298806ccb..2b8f5a2488b051daf6f9c0d161e57e0d1dabeab0:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 24e5687e6d..182465c6a1 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -97,8 +97,14 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location) } ft = m_MimeMng -> GetFileTypeFromExtension(ext); - if (ft && (ft -> GetMimeType(&mime))) return mime; - else return wxEmptyString; + if (ft && (ft -> GetMimeType(&mime))) { + delete ft; + return mime; + } + else { + delete ft; + return wxEmptyString; + } } @@ -155,11 +161,16 @@ wxString wxFileSystemHandler::GetAnchor(const wxString& location) const } -wxString wxFileSystemHandler::FindFirst(const wxString& spec, int flags) { return wxEmptyString; } - -wxString wxFileSystemHandler::FindNext() { return wxEmptyString; } - +wxString wxFileSystemHandler::FindFirst(const wxString& WXUNUSED(spec), + int WXUNUSED(flags)) +{ + return wxEmptyString; +} +wxString wxFileSystemHandler::FindNext() +{ + return wxEmptyString; +} //-------------------------------------------------------------------------------- // wxLocalFSHandler @@ -301,10 +312,10 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location) while (node) { wxFileSystemHandler *h = (wxFileSystemHandler*) node -> GetData(); - if (h->CanOpen(m_Path + location)) + if (h->CanOpen(m_Path + loc)) { - s = h->OpenFile(*this, m_Path + location); - if (s) { m_LastName = m_Path + location; break; } + s = h->OpenFile(*this, m_Path + loc); + if (s) { m_LastName = m_Path + loc; break; } } node = node->GetNext(); } @@ -317,10 +328,10 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location) while (node) { wxFileSystemHandler *h = (wxFileSystemHandler*) node->GetData(); - if (h->CanOpen(location)) + if (h->CanOpen(loc)) { - s = h->OpenFile(*this, location); - if (s) { m_LastName = location; break; } + s = h->OpenFile(*this, loc); + if (s) { m_LastName = loc; break; } } node = node->GetNext(); }