소스 검색

Fixed possible macro redefinition (#1892)

MinGW libstdc++ may define `NOMINMAX` unconditionally. This fixes the case when it is already defined.
FrankHB 2 년 전
부모
커밋
5b9ccaf104
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      examples/main/main.cpp

+ 2 - 0
examples/main/main.cpp

@@ -23,7 +23,9 @@
 #include <unistd.h>
 #elif defined (_WIN32)
 #define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
 #define NOMINMAX
+#endif
 #include <windows.h>
 #include <signal.h>
 #endif