aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2019-10-30 00:19:16 +0000
committerGitHub <noreply@github.com>2019-10-30 00:19:16 +0000
commita89706df030981817e98f737a22dad3053141a82 (patch)
treedd0449f0f81c79c01c677cd3382ae5bb3dbd3090
parentc00454ead06f84e6736f3ab74c3af61da65ad0d1 (diff)
StormPort: Suppress `min/max` macros from windows
This makes StormLib usable with C++ stdlib (e.g. the <algorithm> header which defines std::min/max)
-rw-r--r--src/StormPort.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/StormPort.h b/src/StormPort.h
index c52e9ff..349dd20 100644
--- a/src/StormPort.h
+++ b/src/StormPort.h
@@ -48,7 +48,11 @@
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
+
+ // Suppress definitions of `min` and `max` macros by <windows.h>:
+ #define NOMINMAX 1
#include <windows.h>
+
#include <wininet.h>
#define PLATFORM_LITTLE_ENDIAN