mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-11 14:26:38 +02:00
https://theforceengine.github.io/ "Modern rebuild of the Jedi Engine (needs purchased copy of game data files to run)
29 lines
615 B
Diff
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
|
|
}
|