X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/916af76f40555e9d2548a1538e2a5563222ea373..c13d6ac1ea199d1e3908d40d129e2fd5a4d82df7:/src/common/fileback.cpp diff --git a/src/common/fileback.cpp b/src/common/fileback.cpp index 6e4253c0f7..704b54e165 100644 --- a/src/common/fileback.cpp +++ b/src/common/fileback.cpp @@ -168,11 +168,9 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_filelen += count; if (count < m_buflen) { - delete m_stream; - m_stream = NULL; + wxDELETE(m_stream); if (count > 0) { - delete[] m_buf; - m_buf = NULL; + wxDELETEA(m_buf); m_buflen = 0; } m_parenterror = wxSTREAM_READ_ERROR; @@ -182,8 +180,7 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_buflen = 0; if (!m_stream) { - delete[] m_buf; - m_buf = NULL; + wxDELETEA(m_buf); } } @@ -197,8 +194,7 @@ wxStreamError wxBackingFileImpl::ReadAt(wxFileOffset pos, m_parenterror = m_stream->GetLastError(); if (m_parenterror == wxSTREAM_NO_ERROR) m_parenterror = wxSTREAM_EOF; - delete m_stream; - m_stream = NULL; + wxDELETE(m_stream); } } @@ -293,7 +289,7 @@ wxFileOffset wxBackedInputStream::FindLength() const return len; } - + size_t wxBackedInputStream::OnSysRead(void *buffer, size_t size) { if (!IsOk())