1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-19 05:52:27 +01:00

Replace many C-style casts (#11720)

This commit is contained in:
Michael Steenbeek
2020-05-11 14:32:56 +02:00
committed by GitHub
parent a261b4ce33
commit d7637cd70f
19 changed files with 51 additions and 48 deletions

View File

@@ -37,7 +37,7 @@ protected:
MemoryStream ms(encodedDataBuffer, encodedDataSize);
SawyerChunkReader reader(&ms);
auto chunk = reader.ReadChunk();
ASSERT_EQ((uint8_t)chunk->GetEncoding(), chdr_in.encoding);
ASSERT_EQ(static_cast<uint8_t>(chunk->GetEncoding()), chdr_in.encoding);
ASSERT_EQ(chunk->GetLength(), chdr_in.length);
auto result = memcmp(chunk->GetData(), randomdata, sizeof(randomdata));
ASSERT_EQ(result, 0);
@@ -54,7 +54,7 @@ protected:
MemoryStream ms(data, size);
SawyerChunkReader reader(&ms);
auto chunk = reader.ReadChunk();
ASSERT_EQ((uint8_t)chunk->GetEncoding(), chdr_in->encoding);
ASSERT_EQ(static_cast<uint8_t>(chunk->GetEncoding()), chdr_in->encoding);
ASSERT_EQ(chunk->GetLength(), sizeof(randomdata));
auto result = memcmp(chunk->GetData(), randomdata, sizeof(randomdata));
ASSERT_EQ(result, 0);