diff options
Diffstat (limited to 'modules/comp_zlib/zlib.cpp')
-rw-r--r-- | modules/comp_zlib/zlib.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<Bytef*>(input); + zlib->stream.next_in = (Bytef*)input; zlib->stream.avail_in = length; while(zlib->stream.avail_in != 0) { - zlib->stream.next_out = static_cast<Bytef*>(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<Bytef*>(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<Bytef*>(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<Bytef*>(input; + zlib->stream.next_in = (Bytef*)input; zlib->stream.avail_in = length; while(zlib->stream.avail_in != 0) { - zlib->stream.next_out = static_cast<Bytef*>(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<Bytef*>(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<Bytef*>(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) |