Fix -Wold-style-cast compilation warning (#660)

This commit is contained in:
Charles Cabergs 2025-05-26 11:34:26 +02:00 committed by GitHub
parent 34a9b3aa6a
commit 8f641a3018
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -300,7 +300,7 @@ message_t encode(const Range &parts)
if (part_size < (std::numeric_limits<std::uint8_t>::max)()) {
// small part
*buf++ = (unsigned char) part_size;
*buf++ = static_cast<unsigned char>(part_size);
} else {
// big part
*buf++ = (std::numeric_limits<uint8_t>::max)();