1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Fix compilation on Arch Linux with GCC 14 (#22031)

Fixes #22029
This commit is contained in:
Michał Janiszewski
2024-05-14 00:09:00 +02:00
committed by GitHub
parent 104a5d5222
commit 3c35558f3f
10 changed files with 14 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
# include "TransparencyDepth.h"
# include <SDL.h>
# include <algorithm>
# include <cmath>
# include <openrct2-ui/interface/Window.h>
# include <openrct2/config/Config.h>

View File

@@ -10,6 +10,7 @@
#include "../input/ShortcutManager.h"
#include "Window.h"
#include <algorithm>
#include <openrct2-ui/interface/Widget.h>
#include <openrct2/drawing/Drawing.h>
#include <openrct2/localisation/Formatter.h>

View File

@@ -9,6 +9,7 @@
#pragma once
#include <algorithm>
#include <functional>
template<class ForwardIt, class T, class Compare = std::less<>>

View File

@@ -19,6 +19,7 @@
#include "Memory.hpp"
#include "String.hpp"
#include <algorithm>
#include <fstream>
#include <png.h>
#include <stdexcept>

View File

@@ -24,6 +24,7 @@
#include "LightFX.h"
#include "Weather.h"
#include <algorithm>
#include <cstring>
using namespace OpenRCT2;

View File

@@ -14,6 +14,7 @@
#include "EntityList.h"
#include "EntityRegistry.h"
#include <algorithm>
#include <cmath>
void EntityTweener::AddEntity(EntityBase* entity)

View File

@@ -23,6 +23,7 @@
#include "ObjectLimits.h"
#include "ObjectRepository.h"
#include <algorithm>
#include <cstring>
#include <stdexcept>

View File

@@ -12,6 +12,8 @@
#include "../util/Util.h"
#include "Object.h"
#include <algorithm>
constexpr std::array kAllObjectTypes = {
ObjectType::Ride,
ObjectType::SmallScenery,

View File

@@ -73,7 +73,10 @@ struct PaintStringStruct
struct PaintEntry
{
private:
std::array<uint8_t, std::max({ sizeof(PaintStruct), sizeof(AttachedPaintStruct), sizeof(PaintStringStruct) })> data;
// Avoid including expensive <algorithm> for std::max. Manually ensure we use the largest type.
static_assert(sizeof(PaintStruct) >= sizeof(AttachedPaintStruct));
static_assert(sizeof(PaintStruct) >= sizeof(PaintStringStruct));
std::array<uint8_t, sizeof(PaintStruct)> data;
public:
PaintStruct* AsBasic()

View File

@@ -19,6 +19,7 @@
#include "../scenes/title/TitleScene.h"
#include "zlib.h"
#include <algorithm>
#include <cctype>
#include <cmath>
#include <ctime>