From ba6fded1cd1b271d947a4ca6dc35bdddbfac7f25 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sat, 11 Dec 2010 18:27:28 +0000 Subject: [PATCH] Make sure Windows builds don't get min and max macros defined from WinDef.h. Originally committed to SVN as r4957. --- aegisub/src/agi_pre.h | 1 - aegisub/src/config.h | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/src/agi_pre.h b/aegisub/src/agi_pre.h index 859b0ce72..3b3a47ad3 100644 --- a/aegisub/src/agi_pre.h +++ b/aegisub/src/agi_pre.h @@ -115,7 +115,6 @@ #include #include #include -//#include // Currently only used in audio_player_dsound2.cpp #else diff --git a/aegisub/src/config.h b/aegisub/src/config.h index d9fccf73c..d240c8cd6 100644 --- a/aegisub/src/config.h +++ b/aegisub/src/config.h @@ -2,6 +2,12 @@ #ifdef _WIN32 +// Define min and max macros to identity. +// This will prevent WinDef.h defining them to functions, which prevents +// using std::min and std::max. +#define min min +#define max max + // Windows specific settings #include "config/config_windows.h"