summaryrefslogtreecommitdiff
path: root/src/win95/chnktype.cpp
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2022-06-12 16:53:06 +0200
committerTimotej Lazar <timotej.lazar@araneo.si>2022-06-12 16:53:06 +0200
commit1e38669119d4ce3e06bbad603799e32e6fd7feb2 (patch)
treee787ac4dac41be1f8bcdbeab22c3bbee64f0d8b7 /src/win95/chnktype.cpp
parent0aa9a623f3b38e35b7f1cd26da0237beca2c9988 (diff)
Replace max macro with std::max in C++ code
Fixes compilation on Guix with gcc 12. Not sure which of those is relevant.
Diffstat (limited to 'src/win95/chnktype.cpp')
-rw-r--r--src/win95/chnktype.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/win95/chnktype.cpp b/src/win95/chnktype.cpp
index 4612cdf..123f697 100644
--- a/src/win95/chnktype.cpp
+++ b/src/win95/chnktype.cpp
@@ -1,4 +1,5 @@
#include "chunk.hpp"
+#include <algorithm>
#include <math.h>
#include "chnktype.hpp"
@@ -1044,17 +1045,17 @@ void ChunkAnimSequence::UpdateNormalsAndExtents(ChunkShape const * cs,List<int>*
for (int j=0; j<caf->num_verts; j++)
{
if(vert_in_bb && !vert_in_bb[j]) continue;
- max.x = max(max.x, caf->v_list[j].x);
- max.y = max(max.y, caf->v_list[j].y);
- max.z = max(max.z, caf->v_list[j].z);
+ max.x = std::max(max.x, caf->v_list[j].x);
+ max.y = std::max(max.y, caf->v_list[j].y);
+ max.z = std::max(max.z, caf->v_list[j].z);
- min.x = min(min.x, caf->v_list[j].x);
- min.y = min(min.y, caf->v_list[j].y);
- min.z = min(min.z, caf->v_list[j].z);
+ min.x = std::min(min.x, caf->v_list[j].x);
+ min.y = std::min(min.y, caf->v_list[j].y);
+ min.z = std::min(min.z, caf->v_list[j].z);
double temp_rad = mod(caf->v_list[j]);
- radius = max (radius, (float)temp_rad);
+ radius = std::max(radius, (float)temp_rad);
}
}
if(vert_in_bb) delete [] vert_in_bb;