From 433d907ae80c700847e879201c9e3eeca9b7e785 Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Thu, 21 Dec 2017 12:26:57 +0100 Subject: [PATCH] Problems with max and min in mingw --- src/roommatrix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/roommatrix.c b/src/roommatrix.c index 43fcfe9..cbb19f0 100644 --- a/src/roommatrix.c +++ b/src/roommatrix.c @@ -62,19 +62,21 @@ void roommatrix_populate_from_map(RoomMatrix *rm, Map *m) } } -#ifndef _WIN32 +#ifndef min static int min(int a, int b) { return a > b ? b : a; } +#endif // min +#ifndef max static int max(int a, int b) { return a > b ? a : b; } -#endif // _WIN32 +#endif // max void roommatrix_update_with_player(RoomMatrix *rm, Player *p)