Fix compilation due to size missmatches

This commit is contained in:
duncanspumpkin 2021-04-10 07:23:02 +01:00
parent 6569de4e91
commit a22b8ec90b
3 changed files with 5 additions and 5 deletions

View File

@ -520,7 +520,7 @@ namespace OpenRCT2
} }
auto data = File::ReadAllBytes(ori->Path); auto data = File::ReadAllBytes(ori->Path);
cs.Write<uint32_t>(data.size()); cs.Write<uint32_t>(static_cast<uint32_t>(data.size()));
cs.Write(data.data(), data.size()); cs.Write(data.data(), data.size());
count++; count++;
} }

View File

@ -1239,7 +1239,7 @@ static int32_t cc_remove_park_fences(InteractiveConsole& console, [[maybe_unused
static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
{ {
const auto& tileElements = GetTileElements(); const auto& tileElements = GetTileElements();
int32_t tileElementCount = tileElements.size(); auto tileElementCount = tileElements.size();
int32_t rideCount = ride_get_count(); int32_t rideCount = ride_get_count();
int32_t spriteCount = 0; int32_t spriteCount = 0;
@ -1261,7 +1261,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons
} }
console.WriteFormatLine("Sprites: %d/%d", spriteCount, MAX_ENTITIES); console.WriteFormatLine("Sprites: %d/%d", spriteCount, MAX_ENTITIES);
console.WriteFormatLine("Map Elements: %d/%d", tileElementCount, MAX_TILE_ELEMENTS); console.WriteFormatLine("Map Elements: %zu/%d", tileElementCount, MAX_TILE_ELEMENTS);
console.WriteFormatLine("Banners: %d/%zu", bannerCount, MAX_BANNERS); console.WriteFormatLine("Banners: %d/%zu", bannerCount, MAX_BANNERS);
console.WriteFormatLine("Rides: %d/%d", rideCount, MAX_RIDES); console.WriteFormatLine("Rides: %d/%d", rideCount, MAX_RIDES);
console.WriteFormatLine("Staff: %d/%d", staffCount, STAFF_MAX_COUNT); console.WriteFormatLine("Staff: %d/%d", staffCount, STAFF_MAX_COUNT);

View File

@ -725,7 +725,7 @@ std::vector<uint8_t> Gzip(const void* data, size_t dataLen)
do do
{ {
output.resize(output.size() + nextBlockSize); output.resize(output.size() + nextBlockSize);
strm.avail_out = nextBlockSize; strm.avail_out = static_cast<uInt>(nextBlockSize);
strm.next_out = &output[output.size() - nextBlockSize]; strm.next_out = &output[output.size() - nextBlockSize];
ret = deflate(&strm, flush); ret = deflate(&strm, flush);
if (ret == Z_STREAM_ERROR) if (ret == Z_STREAM_ERROR)
@ -770,7 +770,7 @@ std::vector<uint8_t> Ungzip(const void* data, size_t dataLen)
do do
{ {
output.resize(output.size() + nextBlockSize); output.resize(output.size() + nextBlockSize);
strm.avail_out = nextBlockSize; strm.avail_out = static_cast<uInt>(nextBlockSize);
strm.next_out = &output[output.size() - nextBlockSize]; strm.next_out = &output[output.size() - nextBlockSize];
ret = inflate(&strm, flush); ret = inflate(&strm, flush);
if (ret == Z_STREAM_ERROR) if (ret == Z_STREAM_ERROR)