diff options
author | Christoph Mallon | 2011-08-06 08:27:40 +0200 |
---|---|---|
committer | Christoph Mallon | 2011-08-07 15:19:06 +0200 |
commit | 17044f0784724e0e6cf79dd947569e307dc70366 (patch) | |
tree | b4833d96132d149dbccb3c8d7d23e6b68d6b7f40 | |
parent | 680ef797269c214ccd6fb471f6f82decf3add648 (diff) | |
download | scummvm-rg350-17044f0784724e0e6cf79dd947569e307dc70366.tar.gz scummvm-rg350-17044f0784724e0e6cf79dd947569e307dc70366.tar.bz2 scummvm-rg350-17044f0784724e0e6cf79dd947569e307dc70366.zip |
COMMON: Simplify initialization of z_stream struct.
-rw-r--r-- | common/zlib.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/common/zlib.cpp b/common/zlib.cpp index 71a25bd951..2b3750634a 100644 --- a/common/zlib.cpp +++ b/common/zlib.cpp @@ -70,15 +70,9 @@ protected: public: - GZipReadStream(Common::SeekableReadStream *w) : _wrapped(w) { + GZipReadStream(Common::SeekableReadStream *w) : _wrapped(w), _stream() { assert(w != 0); - _stream.zalloc = Z_NULL; - _stream.zfree = Z_NULL; - _stream.opaque = Z_NULL; - _stream.avail_in = 0; - _stream.next_in = Z_NULL; - // Verify file header is correct w->seek(0, SEEK_SET); uint16 header = w->readUint16BE(); @@ -230,11 +224,8 @@ protected: } public: - GZipWriteStream(Common::WriteStream *w) : _wrapped(w) { + GZipWriteStream(Common::WriteStream *w) : _wrapped(w), _stream() { assert(w != 0); - _stream.zalloc = Z_NULL; - _stream.zfree = Z_NULL; - _stream.opaque = Z_NULL; // Adding 16 to windowBits indicates to zlib that it is supposed to // write gzip headers. This feature was added in zlib 1.2.0.4, |