Apologies for abruptly reverting things, but compilation in Windows is
highest priority. See my post to stepmania-devs for explanations.
This commit is contained in:
@@ -24,16 +24,12 @@
|
|||||||
#define ZERO(x) memset(&x, 0, sizeof(x))
|
#define ZERO(x) memset(&x, 0, sizeof(x))
|
||||||
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
|
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
|
||||||
|
|
||||||
/* Common harmless mismatches. */
|
/* Common harmless mismatches. All min(T,T) and max(T,T) cases are handled
|
||||||
/* replace both with a single function (same with max)
|
* by the generic template we get from <algorithm>. */
|
||||||
* --Steve */
|
inline float min(float a, int b) { return a < b? a:b; }
|
||||||
#ifndef min
|
inline float min(int a, float b) { return a < b? a:b; }
|
||||||
inline float min(float a, float b) { return a < b? a:b; }
|
inline float max(float a, int b) { return a > b? a:b; }
|
||||||
#endif
|
inline float max(int a, float b) { return a > b? a:b; }
|
||||||
|
|
||||||
#ifndef max
|
|
||||||
inline float max(float a, float b) { return a > b? a:b; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Traditional defines. Only use this if you absolutely need
|
/* Traditional defines. Only use this if you absolutely need
|
||||||
* a constant value. */
|
* a constant value. */
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ inline const T& min(const T &a, const T &b, P Pr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define a few functions if necessary */
|
/* Define a few functions if necessary */
|
||||||
|
/* This is the wrong way to do this; see my post to sm-devs. -glenn */
|
||||||
|
#if 0
|
||||||
#ifndef powf
|
#ifndef powf
|
||||||
#define powf (float)pow
|
#define powf (float)pow
|
||||||
#endif
|
#endif
|
||||||
@@ -143,6 +145,7 @@ inline const T& min(const T &a, const T &b, P Pr)
|
|||||||
#ifndef acosf
|
#ifndef acosf
|
||||||
#define acosf (float)acos
|
#define acosf (float)acos
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Don't include our own headers here, since they tend to change
|
/* Don't include our own headers here, since they tend to change
|
||||||
* often. */
|
* often. */
|
||||||
|
|||||||
Reference in New Issue
Block a user