From e756c46b4445ccea7639fd206a85f29855f66ada Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Wed, 26 Jan 2022 23:17:02 +0100 Subject: [PATCH] Name structs in union to fix error Nameless structs inside unions cannot have non-standard types, even if they are trivially constructable and standard aligned. In C++, structs need to be named. --- src/openrct2/world/TileElement.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index 65fbf65a89..1990a43629 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -329,7 +329,7 @@ private: track_type_t TrackType; union { - struct + struct URide { uint8_t Sequence; uint8_t ColourScheme; @@ -343,11 +343,11 @@ private: uint8_t BrakeBoosterSpeed; }; StationIndex stationIndex; - }; - struct + } URide; + struct UMaze { uint16_t MazeEntry; // 6 - }; + } UMaze; }; uint8_t Flags2; RideId RideIndex;