From 58b3577721850e221c1d28debf9cef1c5840fc65 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 28 Apr 2014 05:50:58 +0000 Subject: [PATCH] fmin()/fmax() is available with vs2012 and newer. patch from Eric Wasylishen. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@907 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Quake/common.h b/Quake/common.h index 97c89554..3a510588 100644 --- a/Quake/common.h +++ b/Quake/common.h @@ -35,9 +35,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # pragma warning(disable:4267) /* 'var' : conversion from 'size_t' to 'type', possible loss of data (/Wp64 warning) */ -/* MSC doesn't have fmin() / fmax(), use the min/max macros: */ +/* MSC has fmin() / fmax() in VS2013, and according to the + * docs, VS2012. Use the min/max macros on earlier versions: */ +#if _MSC_VER < 1700 #define fmax q_max #define fmin q_min +#endif #endif /* _MSC_VER */ #endif /* _WIN32 */