Skip to content

Commit

Permalink
[FOLD] ~uLong
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Aug 4, 2016
1 parent 7432ae8 commit f6d2735
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion include/beast/detail/zlib/deflate_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <beast/detail/zlib/zlib.hpp>
#include <beast/detail/zlib/detail/deflate.hpp>
#include <cstdlib>

#include <memory>

namespace beast {
Expand Down Expand Up @@ -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);
Expand Down
9 changes: 5 additions & 4 deletions include/beast/detail/zlib/impl/basic_deflate_stream.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -1487,13 +1487,14 @@ deflateTune(
* allocation.
*/
template<class Allocator>
uLong
std::size_t
basic_deflate_stream<Allocator>::
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 +
Expand Down
1 change: 0 additions & 1 deletion include/beast/detail/zlib/zlib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6d2735

Please sign in to comment.