X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e85922c96bbda1b13538c32f2ecc0989946a0c8..4e47fd5a1b5eecdd668fcbe96b8a64c39af1c196:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index b29a18371b..a2e12cc38b 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -7,10 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "zipstrm.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -34,6 +30,7 @@ #include "wx/buffer.h" #include "wx/ptr_scpd.h" #include "wx/wfstream.h" +#include "wx/link.h" #include "zlib.h" // value for the 'version needed to extract' field (20 means 2.0) @@ -81,12 +78,7 @@ enum { IMPLEMENT_DYNAMIC_CLASS(wxZipEntry, wxArchiveEntry) IMPLEMENT_DYNAMIC_CLASS(wxZipClassFactory, wxArchiveClassFactory) -//FORCE_LINK_ME(zipstrm) -int _wx_link_dummy_func_zipstrm(); -int _wx_link_dummy_func_zipstrm() -{ - return 1; -} +wxFORCE_LINK_THIS_MODULE(zipstrm) ///////////////////////////////////////////////////////////////////////////// @@ -172,7 +164,7 @@ wxStoredInputStream::wxStoredInputStream(wxInputStream& stream) size_t wxStoredInputStream::OnSysRead(void *buffer, size_t size) { - size_t count = wxMin(size, (size_t)(m_len - m_pos)); + size_t count = wxMin(size, wx_truncate_cast(size_t, m_len - m_pos)); count = m_parent_i_stream->Read(buffer, count).LastRead(); m_pos += count; @@ -1824,7 +1816,7 @@ wxFileOffset wxZipInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode) // Output stream #include "wx/listimpl.cpp" -WX_DEFINE_LIST(wx__ZipEntryList); +WX_DEFINE_LIST(wx__ZipEntryList) wxZipOutputStream::wxZipOutputStream(wxOutputStream& stream, int level /*=-1*/,