X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd0af4bb63747bc46e70e1e3212f49966cb2bbfc..8cbc59fe84f046685b873cf58f6c56debe59de1c:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 70d5651070..a3af2d6246 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -28,7 +28,7 @@ #include "wx/datstrm.h" #include "wx/zstream.h" #include "wx/mstream.h" -#include "wx/ptr_scpd.h" +#include "wx/scopedptr.h" #include "wx/wfstream.h" #include "zlib.h" @@ -140,7 +140,7 @@ static wxFileOffset QuietSeek(wxInputStream& stream, wxFileOffset pos) ///////////////////////////////////////////////////////////////////////////// // Class factory -wxZipClassFactory g_wxZipClassFactory; +static wxZipClassFactory g_wxZipClassFactory; wxZipClassFactory::wxZipClassFactory() { @@ -251,7 +251,7 @@ private: wxFileOffset m_pos; wxFileOffset m_len; - DECLARE_NO_COPY_CLASS(wxStoredInputStream) + wxDECLARE_NO_COPY_CLASS(wxStoredInputStream); }; wxStoredInputStream::wxStoredInputStream(wxInputStream& stream) @@ -297,7 +297,7 @@ protected: private: wxFileOffset m_pos; - DECLARE_NO_COPY_CLASS(wxStoredOutputStream) + wxDECLARE_NO_COPY_CLASS(wxStoredOutputStream); }; size_t wxStoredOutputStream::OnSysWrite(const void *buffer, size_t size) @@ -359,7 +359,7 @@ private: size_t m_start; size_t m_end; - DECLARE_NO_COPY_CLASS(wxTeeInputStream) + wxDECLARE_NO_COPY_CLASS(wxTeeInputStream); }; wxTeeInputStream::wxTeeInputStream(wxInputStream& stream) @@ -455,7 +455,7 @@ private: enum { BUFSIZE = 8192 }; wxCharBuffer m_dummy; - DECLARE_NO_COPY_CLASS(wxRawInputStream) + wxDECLARE_NO_COPY_CLASS(wxRawInputStream); }; wxRawInputStream::wxRawInputStream(wxInputStream& stream) @@ -1336,7 +1336,7 @@ void wxZipInputStream::Init(const wxString& file) Init(); m_allowSeeking = true; wxFFileInputStream *ffile; - ffile = wx_static_cast(wxFFileInputStream*, m_parent_i_stream); + ffile = static_cast(m_parent_i_stream); wxZipEntryPtr_ entry; if (ffile->Ok()) { @@ -2051,7 +2051,7 @@ bool wxZipOutputStream::CopyEntry(wxArchiveEntry *entry, return false; } - return CopyEntry(zipEntry, wx_static_cast(wxZipInputStream&, stream)); + return CopyEntry(zipEntry, static_cast(stream)); } bool wxZipOutputStream::CopyArchiveMetaData(wxZipInputStream& inputStream) @@ -2065,7 +2065,7 @@ bool wxZipOutputStream::CopyArchiveMetaData(wxZipInputStream& inputStream) bool wxZipOutputStream::CopyArchiveMetaData(wxArchiveInputStream& stream) { - return CopyArchiveMetaData(wx_static_cast(wxZipInputStream&, stream)); + return CopyArchiveMetaData(static_cast(stream)); } void wxZipOutputStream::SetLevel(int level) @@ -2318,7 +2318,7 @@ bool wxZipOutputStream::Close() m_lasterror = m_parent_o_stream->GetLastError(); m_endrecWritten = true; - + if (!wxFilterOutputStream::Close() || !IsOk()) return false; m_lasterror = wxSTREAM_EOF;