Explicit cast from size_t to uInt (#941)
* Explicit cast from size_t to uInt * static_cast<uInt> instead of C style cast
This commit is contained in:
parent
dcf24d45a2
commit
2917b8a005
@ -2564,7 +2564,7 @@ public:
|
|||||||
|
|
||||||
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
|
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
|
||||||
do {
|
do {
|
||||||
strm_.avail_out = buff.size();
|
strm_.avail_out = static_cast<uInt>(buff.size());
|
||||||
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
|
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
|
||||||
|
|
||||||
ret = deflate(&strm_, flush);
|
ret = deflate(&strm_, flush);
|
||||||
@ -2615,7 +2615,7 @@ public:
|
|||||||
|
|
||||||
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
|
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
|
||||||
while (strm_.avail_in > 0) {
|
while (strm_.avail_in > 0) {
|
||||||
strm_.avail_out = buff.size();
|
strm_.avail_out = static_cast<uInt>(buff.size());
|
||||||
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
|
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
|
||||||
|
|
||||||
ret = inflate(&strm_, Z_NO_FLUSH);
|
ret = inflate(&strm_, Z_NO_FLUSH);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user