mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
Change check for MIN/MAX macros: Always undef those so that our templates are used (which are safer, consider MIN(a++, b++))
svn-id: r21692
This commit is contained in:
parent
4a8c9c323d
commit
453e69b6c2
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user