summaryrefslogtreecommitdiff
path: root/src/win95/mishchnk.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/mishchnk.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/mishchnk.cpp')
-rw-r--r--src/win95/mishchnk.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/win95/mishchnk.cpp b/src/win95/mishchnk.cpp
index b4521c3..2c3777b 100644
--- a/src/win95/mishchnk.cpp
+++ b/src/win95/mishchnk.cpp
@@ -1,3 +1,5 @@
+#include <algorithm>
+
#include "chunk.hpp"
#include "chnktype.hpp"
#include "mishchnk.hpp"
@@ -625,7 +627,7 @@ void File_Chunk::post_input_processing()
LIF<Shape_Chunk *> sli(&shplist);
for (; !sli.done(); sli.next())
{
- Shape_Chunk::max_id = max (Shape_Chunk::max_id,sli()->get_header()->file_id_num);
+ Shape_Chunk::max_id = std::max(Shape_Chunk::max_id,sli()->get_header()->file_id_num);
}
Shape_Chunk** shape_array=new Shape_Chunk*[Shape_Chunk::max_id+1];
@@ -803,7 +805,7 @@ BOOL File_Chunk::check_file()
// Here we update max_id
- Shape_Chunk::max_id = max (Shape_Chunk::max_id,id);
+ Shape_Chunk::max_id = std::max(Shape_Chunk::max_id,id);
// go to version number
SetFilePointer(rif_file,shphead.first_entry() + 100,0,FILE_BEGIN);
@@ -1515,7 +1517,7 @@ void File_Chunk::build_object_array()
//find the highest object index
for(oblif.restart();!oblif.done();oblif.next())
{
- object_array_size=max(object_array_size,oblif()->object_data.index_num+1);
+ object_array_size=std::max(object_array_size,oblif()->object_data.index_num+1);
}
if(object_array_size<=0) return;
@@ -1864,7 +1866,7 @@ void RIF_File_Chunk::post_input_processing()
for (LIF<Shape_Chunk *> sli(&shplist); !sli.done(); sli.next())
{
- Shape_Chunk::max_id = max (Shape_Chunk::max_id,sli()->get_header()->file_id_num);
+ Shape_Chunk::max_id = std::max(Shape_Chunk::max_id,sli()->get_header()->file_id_num);
}
Chunk_With_Children::post_input_processing();