]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
crn_rgba: use “algorithm” header to avoid std::min/max being unknown
authorThomas Debesse <dev@illwieckz.net>
Wed, 25 Dec 2019 19:22:59 +0000 (20:22 +0100)
committerThomas Debesse <dev@illwieckz.net>
Wed, 25 Dec 2019 20:27:09 +0000 (21:27 +0100)
avoid this error on some systems (Clang on macOS or FreeBSD):

netradiant/libs/crnrgba/crn_rgba.cpp:93:38: error: no
      member named 'max' in namespace 'std'
    const crn_uint32 blocks_x = std::max(1U, (ti.m_width + 3) >> 2);

libs/crnrgba/crn_rgba.cpp

index 8dec126fe1423734ebd7a59ac2653624ee4a7bbf..012b95fb822121e96784ad18e4929c01003d699a 100644 (file)
@@ -25,7 +25,7 @@
 #include <string.h>
 
 #include <memory>
-
+#include <algorithm>
 
 #include "ddslib.h"
 #include "../crunch/inc/crn_decomp.h"