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:
Baruch Nissenbaum 2021-05-20 01:03:59 +03:00 committed by GitHub
parent dcf24d45a2
commit 2917b8a005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2564,7 +2564,7 @@ public:
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
do {
strm_.avail_out = buff.size();
strm_.avail_out = static_cast<uInt>(buff.size());
strm_.next_out = reinterpret_cast<Bytef *>(buff.data());
ret = deflate(&strm_, flush);
@ -2615,7 +2615,7 @@ public:
std::array<char, CPPHTTPLIB_COMPRESSION_BUFSIZ> buff{};
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());
ret = inflate(&strm_, Z_NO_FLUSH);