]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileback.cpp
Remove temporary files created by wxFileName unit test case.
[wxWidgets.git] / src / common / fileback.cpp
index bc5f2ff9dd7044fdeb136af950bb24c41a127750..704b54e1657f1fa54621e1c7cfd5a7831f179c90 100644 (file)
@@ -14,9 +14,9 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_BACKINGFILE
+#if wxUSE_FILESYSTEM
 
-#include "wx/fileback.h"
+#include "wx/private/fileback.h"
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
@@ -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())
@@ -335,4 +331,4 @@ wxFileOffset wxBackedInputStream::OnSysTell() const
     return m_pos;
 }
 
-#endif // wxUSE_BACKINGFILE
+#endif // wxUSE_FILESYSTEM