mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue