diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 7b9f239043..342b90cb1a 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -138,10 +138,10 @@ void CheatsSerialise(DataSerialiser& ds) for (uint16_t i = 0; i < count; i++) { - CheatType type; - ds << reinterpret_cast(type); + int32_t type = 0; + ds << type; - switch (type) + switch (static_cast(type)) { case CheatType::SandboxMode: ds << gCheatsSandboxMode; @@ -206,6 +206,8 @@ void CheatsSerialise(DataSerialiser& ds) case CheatType::EnableAllDrawableTrackPieces: ds << gCheatsEnableAllDrawableTrackPieces; break; + default: + break; } } }