Fix mapgen using unitialised height map values
[oweals/minetest.git] / src / profiler.h
index e746c489c525355a92d188aeb864676fa505f468..5816f05ca66652960034708e4bc60c58fcdcb0ef 100644 (file)
@@ -22,13 +22,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes.h"
 #include <string>
+#include <map>
+
 #include "jthread/jmutex.h"
 #include "jthread/jmutexautolock.h"
-#include <map>
 #include "util/timetaker.h"
 #include "util/numeric.h" // paging()
 #include "debug.h" // assert()
 
+#define MAX_PROFILER_TEXT_ROWS 20
+
 /*
        Time profiler
 */
@@ -73,7 +76,7 @@ public:
                        else{
                                /* No add shall have been used */
                                assert(n->second != -2);
-                               n->second = (std::max)(n->second, 0) + 1;
+                               n->second = MYMAX(n->second, 0) + 1;
                        }
                }
                {