Platform.h: Reject big-endian systems (#23684)

Several tests fail on big-endian, indicating that the code isn't prepared
for such systems, but it wouldn't be obvious from just compiling OpenRCT2.
Make it obvious by checking it on Platform.h. Example output:

/home/user/src/OpenRCT2/src/openrct2-ui/../openrct2/platform/Platform.h:34:35: error: static assertion failed: OpenRCT2 is known to be broken on big endian. Proceed with caution!
   34 | static_assert(std::endian::native == std::endian::little,
      |               ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ninja: job failed
This commit is contained in:
J. Neuschäfer authored and GitHub committed 2025-01-27 19:37:42 +01:00
1 parent aeca38d131
commit 4bc13f2678
1 file changed
+4
+4
View File
@@ -13,6 +13,7 @@
#include "../core/DateTime.h"
#include "../core/StringTypes.h"
#include <bit>
#include <ctime>
#include <vector>
@@ -31,6 +32,9 @@
#define MAX_PATH 260
#endif
static_assert(
std::endian::native == std::endian::little, "OpenRCT2 is known to be broken on big endian. Proceed with caution!");
enum class SPECIAL_FOLDER
{
USER_CACHE,