Fix uint64_t to size_t conversion warning

Fixes an MSVC warning with an explicit cast.

Client: cpp
This commit is contained in:
Kevin Wojniak 2019-12-12 15:42:00 -08:00 committed by Duru Can Celasun
parent dfae5d7f4a
commit 0ebf3ce99d

View File

@ -372,7 +372,7 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len) {
}
// Allocate into a new pointer so we don't bork ours if it fails.
auto* new_buffer = static_cast<uint8_t*>(std::realloc(buffer_, new_size));
auto* new_buffer = static_cast<uint8_t*>(std::realloc(buffer_, static_cast<std::size_t>(new_size)));
if (new_buffer == nullptr) {
throw std::bad_alloc();
}