aports/testing/theforceengine/compilation_32bit_systems.patch
Marian Buschsieweke 435fd39354 testing/theforceengine: new aport
https://theforceengine.github.io/
"Modern rebuild of the Jedi Engine (needs purchased copy of game data files to run)
2023-09-12 10:18:50 +00:00

29 lines
615 B
Diff

This fixes compilation on 32 bit systems where `size_t min(size_t, size_t)`
and `uint32_t min(uint32_t, uint32_t)` is the same signature.
--- a/TheForceEngine/TFE_Jedi/Math/core_math.h
+++ b/TheForceEngine/TFE_Jedi/Math/core_math.h
@@ -6,6 +6,9 @@
#include <TFE_System/types.h>
#include "fixedPoint.h"
#include "cosTable.h"
+#include <climits>
+#include <cstddef>
+#include <cstdint>
namespace TFE_Jedi
{
@@ -337,6 +340,7 @@
return x - (x >> 1);
}
+#if SIZE_MAX != UINT32_MAX
// Size_t
inline size_t min(size_t a, size_t b)
{
@@ -352,4 +356,5 @@
{
return min(max(x, a), b);
}
+#endif
}