diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-03-05 14:07:20 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-03-05 16:58:20 +0000 |
commit | 9bb78a8f591edc1c9688d5ab1995a6d250b8ba4c (patch) | |
tree | 5325e5644df48bb28eadde94ef12c9e60e8a9ffa /common/trace_ostream_zlib.cpp | |
parent | 2ed086f3412951edfd0299388635d63aa4ae5265 (diff) |
common: Remove ZLibOutStream::close virtual method.
Unnecessary.
Diffstat (limited to 'common/trace_ostream_zlib.cpp')
-rw-r--r-- | common/trace_ostream_zlib.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/common/trace_ostream_zlib.cpp b/common/trace_ostream_zlib.cpp index 54893870..bada79ef 100644 --- a/common/trace_ostream_zlib.cpp +++ b/common/trace_ostream_zlib.cpp @@ -48,7 +48,6 @@ public: protected: virtual bool write(const void *buffer, size_t length); - virtual void close(); virtual void flush(); private: gzFile m_gzFile; @@ -61,7 +60,10 @@ ZLibOutStream::ZLibOutStream(gzFile file) ZLibOutStream::~ZLibOutStream() { - close(); + if (m_gzFile) { + gzclose(m_gzFile); + m_gzFile = nullptr; + } } bool ZLibOutStream::write(const void *buffer, size_t length) @@ -69,14 +71,6 @@ bool ZLibOutStream::write(const void *buffer, size_t length) return gzwrite(m_gzFile, buffer, unsigned(length)) != -1; } -void ZLibOutStream::close() -{ - if (m_gzFile) { - gzclose(m_gzFile); - m_gzFile = nullptr; - } -} - void ZLibOutStream::flush() { gzflush(m_gzFile, Z_SYNC_FLUSH); |