mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Complete the previous commit by also removing the inline min and max
functions defined in HeadSpin.h without breaking (3ds)Max compilation
This commit is contained in:
@ -242,51 +242,6 @@ inline void hsSwap(float& a, float& b)
|
||||
# define NULL_STMT ((void)0)
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
inline T max (const T & a, const T & b) {
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline unsigned max (int a, unsigned b) {
|
||||
return ((unsigned)a > b) ? a : b;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline unsigned max (unsigned a, int b) {
|
||||
return (a > (unsigned)b) ? a : b;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
inline T min (const T & a, const T & b) {
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline unsigned min (int a, unsigned b) {
|
||||
return ((unsigned)a < b) ? a : b;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline unsigned min (unsigned a, int b) {
|
||||
return (a < (unsigned)b) ? a : b;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* MAX/MIN macros
|
||||
* These are less safe than the inline function versions, since they
|
||||
* evaluate parameters twice. However, they can be used to produce
|
||||
* compile-time constants.
|
||||
*
|
||||
***/
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* SWAP
|
||||
|
@ -61,8 +61,16 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
# define _WIN32_IE 0x400
|
||||
# endif
|
||||
|
||||
// HACK: Max headers depend on the min() and max() macros normally pulled
|
||||
// in by windows.h... However, we usually disable those, since they break
|
||||
// std::min and std::max. Therefore, we bring the std:: versions down to
|
||||
// the global namespace so we can still compile max code without breaking
|
||||
// everything else :/
|
||||
# ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
# include <algorithm>
|
||||
using std::min;
|
||||
using std::max;
|
||||
# endif
|
||||
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
|
Reference in New Issue
Block a user