From 1e38669119d4ce3e06bbad603799e32e6fd7feb2 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 12 Jun 2022 16:53:06 +0200 Subject: Replace max macro with std::max in C++ code Fixes compilation on Guix with gcc 12. Not sure which of those is relevant. --- src/win95/chnktype.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/win95/chnktype.cpp') 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 #include #include "chnktype.hpp" @@ -1044,17 +1045,17 @@ void ChunkAnimSequence::UpdateNormalsAndExtents(ChunkShape const * cs,List* for (int j=0; jnum_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; -- cgit v1.3