From 7459ba0efea3e964f75b03c46e68ab92d528054f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 28 Feb 2023 20:04:52 +0100 Subject: [PATCH] GCC 13 fixes (#19519) This addresses issues when compiling with GCC 13 --- src/openrct2/park/ParkFile.cpp | 2 +- src/openrct2/park/ParkFile.h | 1 + src/openrct2/ride/coaster/JuniorRollerCoaster.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 8d09ae213c..fff4b7014e 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -795,7 +795,7 @@ namespace OpenRCT2 // Awards if (version <= 6) { - Award awards[RCT2::Limits::MaxAwards]; + Award awards[RCT2::Limits::MaxAwards]{}; cs.ReadWriteArray(awards, [&cs](Award& award) { if (award.Time != 0) { diff --git a/src/openrct2/park/ParkFile.h b/src/openrct2/park/ParkFile.h index c612b11597..42680c7a88 100644 --- a/src/openrct2/park/ParkFile.h +++ b/src/openrct2/park/ParkFile.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 277c6f7d21..635c42d53b 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -5170,7 +5170,7 @@ void JuniorRCPaintTrack60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction], height, + session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction & 3], height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5262,7 +5262,7 @@ void JuniorRCPaintTrack25DegUpTo60DegUp( if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction], height, + session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction & 3], height, session.TrackColours[SCHEME_SUPPORTS]); }