From f6d2735f6aae32078001c18619254c91c48ac851 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 4 Aug 2016 17:43:09 -0400 Subject: [PATCH] [FOLD] ~uLong --- include/beast/detail/zlib/deflate_stream.hpp | 3 ++- include/beast/detail/zlib/impl/basic_deflate_stream.ipp | 9 +++++---- include/beast/detail/zlib/zlib.hpp | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/beast/detail/zlib/deflate_stream.hpp b/include/beast/detail/zlib/deflate_stream.hpp index 43fb73519b..90cd3030e0 100644 --- a/include/beast/detail/zlib/deflate_stream.hpp +++ b/include/beast/detail/zlib/deflate_stream.hpp @@ -38,6 +38,7 @@ #include #include #include + #include namespace beast { @@ -282,7 +283,7 @@ class basic_deflate_stream : public z_stream static int deflateParams (basic_deflate_stream* strm, int level, int strategy); static int deflateTune (basic_deflate_stream* strm, int good_length, int max_lazy, int nice_length, int max_chain); - static uLong deflateBound (basic_deflate_stream* strm, uLong sourceLen); + static std::size_t deflateBound (basic_deflate_stream* strm, std::size_t sourceLen); static int deflatePending (basic_deflate_stream* strm, unsigned *pending, int *bits); static int deflatePrime (basic_deflate_stream* strm, int bits, int value); static int deflateInit (basic_deflate_stream* strm, int level); diff --git a/include/beast/detail/zlib/impl/basic_deflate_stream.ipp b/include/beast/detail/zlib/impl/basic_deflate_stream.ipp index ba06c53f3e..620699d2d4 100644 --- a/include/beast/detail/zlib/impl/basic_deflate_stream.ipp +++ b/include/beast/detail/zlib/impl/basic_deflate_stream.ipp @@ -762,7 +762,7 @@ _tr_flush_block( } Assert (s->compressed_len_ == s->bits_sent_, "bad compressed size"); /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. + * and std::size_t implemented on 32 bits. */ init_block(s); @@ -1487,13 +1487,14 @@ deflateTune( * allocation. */ template -uLong +std::size_t basic_deflate_stream:: deflateBound( basic_deflate_stream* strm, - uLong sourceLen) + std::size_t sourceLen) { - uLong complen, wraplen; + std::size_t complen; + std::size_t wraplen; /* conservative upper bound for compressed data */ complen = sourceLen + diff --git a/include/beast/detail/zlib/zlib.hpp b/include/beast/detail/zlib/zlib.hpp index 91c0bc38b2..aad3089871 100644 --- a/include/beast/detail/zlib/zlib.hpp +++ b/include/beast/detail/zlib/zlib.hpp @@ -45,7 +45,6 @@ namespace zlib { typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ /* The application must update next_in and avail_in when avail_in has dropped