From 4e9d101a1b18316fe14829a52c1e4df20208aa5d Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 10 Apr 2008 04:24:36 +0000 Subject: Fix some completely bogus code in zlib.cpp that was causing compilation failures. Seemingly from a bad merge around Christmas? --- modules/comp_zlib/zlib.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/comp_zlib/zlib.cpp b/modules/comp_zlib/zlib.cpp index 3f4eb3b37..1c2b31957 100644 --- a/modules/comp_zlib/zlib.cpp +++ b/modules/comp_zlib/zlib.cpp @@ -99,12 +99,12 @@ void Zlib_Compression::start_msg() *************************************************/ void Zlib_Compression::write(const byte input[], u32bit length) { - zlib->stream.next_in = static_cast(input); + zlib->stream.next_in = (Bytef*)input; zlib->stream.avail_in = length; while(zlib->stream.avail_in != 0) { - zlib->stream.next_out = static_cast(buffer.begin()); + zlib->stream.next_out = (Bytef*)buffer.begin(); zlib->stream.avail_out = buffer.size(); deflate(&(zlib->stream), Z_NO_FLUSH); send(buffer.begin(), buffer.size() - zlib->stream.avail_out); @@ -122,7 +122,7 @@ void Zlib_Compression::end_msg() int rc = Z_OK; while(rc != Z_STREAM_END) { - zlib->stream.next_out = static_cast(buffer.begin()); + zlib->stream.next_out = (Bytef*)buffer.begin(); zlib->stream.avail_out = buffer.size(); rc = deflate(&(zlib->stream), Z_FINISH); send(buffer.begin(), buffer.size() - zlib->stream.avail_out); @@ -140,7 +140,7 @@ void Zlib_Compression::flush() while(true) { - zlib->stream.next_out = static_cast(buffer.begin()); + zlib->stream.next_out = (Bytef*)buffer.begin(); zlib->stream.avail_out = buffer.size(); deflate(&(zlib->stream), Z_FULL_FLUSH); send(buffer.begin(), buffer.size() - zlib->stream.avail_out); @@ -190,12 +190,12 @@ void Zlib_Decompression::write(const byte input[], u32bit length) { if(length) no_writes = false; - zlib->stream.next_in = static_cast(input; + zlib->stream.next_in = (Bytef*)input; zlib->stream.avail_in = length; while(zlib->stream.avail_in != 0) { - zlib->stream.next_out = static_cast(buffer.begin(); + zlib->stream.next_out = (Bytef*)buffer.begin(); zlib->stream.avail_out = buffer.size(); int rc = inflate(&(zlib->stream), Z_SYNC_FLUSH); @@ -215,7 +215,7 @@ void Zlib_Decompression::write(const byte input[], u32bit length) { u32bit read_from_block = length - zlib->stream.avail_in; start_msg(); - zlib->stream.next_in = static_cast(input + read_from_block; + zlib->stream.next_in = (Bytef*)input + read_from_block; zlib->stream.avail_in = length - read_from_block; input += read_from_block; length -= read_from_block; @@ -235,7 +235,7 @@ void Zlib_Decompression::end_msg() int rc = Z_OK; while(rc != Z_STREAM_END) { - zlib->stream.next_out = static_cast(buffer.begin(); + zlib->stream.next_out = (Bytef*)buffer.begin(); zlib->stream.avail_out = buffer.size(); rc = inflate(&(zlib->stream), Z_SYNC_FLUSH); if(rc != Z_OK && rc != Z_STREAM_END) -- cgit v1.2.3