Fix min/max name clashing

Thu, 23 Jul 2015 17:39:52 +0300

author
Teemu Piippo <tsapii@utu.fi>
date
Thu, 23 Jul 2015 17:39:52 +0300
changeset 93
1ea012a6e1ec
parent 92
39947c46ed17
child 94
294803d4ab5d

Fix min/max name clashing

sources/basics.h file | annotate | diff | comparison | revisions
sources/main.cpp file | annotate | diff | comparison | revisions
--- a/sources/basics.h	Thu Jul 23 02:35:13 2015 +0300
+++ b/sources/basics.h	Thu Jul 23 17:39:52 2015 +0300
@@ -65,6 +65,9 @@
 #define TEXTCOLOR_BrightCyan	TEXTCOLOR_Escape "V"
 #define TEXTCOLOR_Reset			TEXTCOLOR_Escape "-"
 
+#undef min
+#undef max
+
 BEGIN_ZFC_NAMESPACE
 
 template<typename T>
--- a/sources/main.cpp	Thu Jul 23 02:35:13 2015 +0300
+++ b/sources/main.cpp	Thu Jul 23 17:39:52 2015 +0300
@@ -28,15 +28,13 @@
 	SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include "main.h"
-
 #ifndef _WIN32
 # include <sys/select.h>
 #else
 # include <winsock2.h>
 #endif
 
-#include <time.h>
+#include "main.h"
 #include "network/rconsession.h"
 #include "huffman.h"
 #include "interface.h"
@@ -87,7 +85,7 @@
 			FD_SET (0, &fdset);
 
 			int fd = iface.get_session()->socket()->file_descriptor();
-			highest = max (highest, fd);
+			highest = zfc::max (highest, fd);
 			FD_SET (fd, &fdset);
 
 			select (highest + 1, &fdset, nullptr, nullptr, &timeout);

mercurial