replaced wxStream::GetSize() with GetLength() (still keep the former but it will be deprecated) (second part of patch 1063498)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -60,7 +60,7 @@ wxZipInputStream::wxZipInputStream(const wxString& archive, const wxString& file
|
||||
m_lasterror = wxSTREAM_READ_ERROR;
|
||||
return;
|
||||
}
|
||||
m_Size = (size_t)zinfo.uncompressed_size;
|
||||
m_Size = zinfo.uncompressed_size;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,25 +77,25 @@ wxZipInputStream::~wxZipInputStream()
|
||||
|
||||
bool wxZipInputStream::Eof() const
|
||||
{
|
||||
wxASSERT_MSG( m_Pos <= (wxFileOffset)m_Size,
|
||||
wxASSERT_MSG( m_Pos <= m_Size,
|
||||
_T("wxZipInputStream: invalid current position") );
|
||||
|
||||
return m_Pos >= (wxFileOffset)m_Size;
|
||||
return m_Pos >= m_Size;
|
||||
}
|
||||
|
||||
|
||||
size_t wxZipInputStream::OnSysRead(void *buffer, size_t bufsize)
|
||||
{
|
||||
wxASSERT_MSG( m_Pos <= (wxFileOffset)m_Size,
|
||||
wxASSERT_MSG( m_Pos <= m_Size,
|
||||
_T("wxZipInputStream: invalid current position") );
|
||||
|
||||
if ( m_Pos >= (wxFileOffset)m_Size )
|
||||
if ( m_Pos >= m_Size )
|
||||
{
|
||||
m_lasterror = wxSTREAM_EOF;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m_Pos + bufsize > m_Size)
|
||||
if (m_Pos + bufsize > m_Size + (size_t)0)
|
||||
bufsize = m_Size - m_Pos;
|
||||
|
||||
unzReadCurrentFile((unzFile)m_Archive, buffer, bufsize);
|
||||
|
Reference in New Issue
Block a user