[Scummvm-cvs-logs] SF.net SVN: scummvm: [21692] scummvm/trunk/common/util.h
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Apr 8 05:42:01 CEST 2006
Revision: 21692
Author: fingolfin
Date: 2006-04-08 05:41:02 -0700 (Sat, 08 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21692&view=rev
Log Message:
-----------
Change check for MIN/MAX macros: Always undef those so that our templates are used (which are safer, consider MIN(a++, b++))
Modified Paths:
--------------
scummvm/trunk/common/util.h
Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h 2006-04-08 12:39:27 UTC (rev 21691)
+++ scummvm/trunk/common/util.h 2006-04-08 12:41:02 UTC (rev 21692)
@@ -26,18 +26,17 @@
#include "common/str.h"
#include "common/array.h"
-#if defined (__INNOTEK_LIBC__) || (defined (__amigaos4__) && defined(__NEWLIB__))
+#ifdef MIN
#undef MIN
+#endif
+
+#ifdef MAX
#undef MAX
#endif
template<typename T> inline T ABS (T x) { return (x>=0) ? x : -x; }
-#if !defined(MIN)
template<typename T> inline T MIN (T a, T b) { return (a<b) ? a : b; }
-#endif
-#if !defined(MAX)
template<typename T> inline T MAX (T a, T b) { return (a>b) ? a : b; }
-#endif
/**
* Template method which swaps the vaulues of its two parameters.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list