X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f8525bf227e95765540cc8d37999ce5f8f428db..83c22707a40f2b96601748bddbce4d927ab3c084:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 1881dce9a8..4f8f84d4eb 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -8,7 +8,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "fs_mem.h" #endif #include "wx/wxprec.h" @@ -17,7 +17,7 @@ #pragma hdrstop #endif -#if (wxUSE_HTML || wxUSE_FS_INET || wxUSE_FS_ZIP) && wxUSE_STREAMS +#if wxUSE_FILESYSTEM && wxUSE_STREAMS #ifndef WXPRECOMP #include "wx/wx.h" @@ -27,7 +27,6 @@ #include "wx/fs_mem.h" #include "wx/mstream.h" - class MemFSHashObj : public wxObject { public: @@ -112,9 +111,11 @@ wxFSFile* wxMemoryFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString -wxString wxMemoryFSHandler::FindFirst(const wxString& spec, int flags) +wxString wxMemoryFSHandler::FindFirst(const wxString& WXUNUSED(spec), + int WXUNUSED(flags)) { - wxLogWarning(wxT("wxMemoryFSHandler::FindFirst not implemented")); + wxFAIL_MSG(wxT("wxMemoryFSHandler::FindFirst not implemented")); + return wxEmptyString; } @@ -122,12 +123,12 @@ wxString wxMemoryFSHandler::FindFirst(const wxString& spec, int flags) wxString wxMemoryFSHandler::FindNext() { - wxLogWarning(wxT("wxMemoryFSHandler::FindNext not implemented")); + wxFAIL_MSG(wxT("wxMemoryFSHandler::FindNext not implemented")); + return wxEmptyString; } - bool wxMemoryFSHandler::CheckHash(const wxString& filename) { if (m_Hash == NULL) @@ -149,19 +150,21 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename) +#if wxUSE_GUI + /*static*/ void wxMemoryFSHandler::AddFile(const wxString& filename, wxImage& image, long type) { if (!CheckHash(filename)) return; wxMemoryOutputStream mems; - if (image.Ok() && image.SaveFile(mems, type)) + if (image.Ok() && image.SaveFile(mems, (int)type)) m_Hash -> Put(filename, new MemFSHashObj(mems)); else { wxString s; s.Printf(_("Failed to store image '%s' to memory VFS!"), filename.c_str()); - printf("'%s'\n", s.c_str()); + wxPrintf(wxT("'%s'\n"), s.c_str()); wxLogError(s); } } @@ -173,6 +176,7 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename) AddFile(filename, img, type); } +#endif /*static*/ void wxMemoryFSHandler::AddFile(const wxString& filename, const wxString& textdata) { @@ -204,4 +208,4 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename) -#endif // wxUSE_FS_ZIP +#endif // wxUSE_FILESYSTEM && wxUSE_FS_ZIP