Fix warning about double to float conversion

This commit is contained in:
Damian Korczowski
2021-03-11 19:11:23 +01:00
parent 64a5b01bd9
commit 42d31c0c65

View File

@@ -152,7 +152,7 @@ void NetworkManager::CreateMessageBuffers()
const uint64 totalSize = static_cast<uint64>(Config.MessagePoolSize) * Config.MessageSize;
// Calculate the amount of pages that we need
const uint32 numPages = totalSize > pageSize ? Math::CeilToInt(totalSize / static_cast<double>(pageSize)) : 1;
const uint32 numPages = totalSize > pageSize ? Math::CeilToInt(totalSize / static_cast<float>(pageSize)) : 1;
MessageBuffer = static_cast<uint8*>(Platform::AllocatePages(numPages, pageSize));
Platform::MemorySet(MessageBuffer, 0, numPages * pageSize);