Forráskód Böngészése

Add NOMINMAX define

Because the windows stdlib loves defining min and max, breaking
otherwise valid code calling std::min/std::max.
Bart van Strien 6 éve
szülő
commit
af96f6dd8b
2 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 0
      src/CMakeLists.txt
  2. 0 2
      src/common/PlaintextConnection.cpp

+ 1 - 0
src/CMakeLists.txt

@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.0)
 
 ### Basic compilation settings
 set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+add_definitions (-DNOMINMAX)
 
 configure_file (
 	common/config.h.in

+ 0 - 2
src/common/PlaintextConnection.cpp

@@ -8,8 +8,6 @@
 #else
 #	include <winsock2.h>
 #	include <ws2tcpip.h>
-#	undef min
-#	undef max
 #endif // USE_WINSOCK
 
 #include "PlaintextConnection.h"