diff --git a/public/mathlib/mathlib.h b/public/mathlib/mathlib.h index eaa8b929..457a88fc 100644 --- a/public/mathlib/mathlib.h +++ b/public/mathlib/mathlib.h @@ -329,7 +329,7 @@ void inline SinCos( float radians, float *sine, float *cosine ) fstp DWORD PTR [eax] } #elif defined( GNUC ) - register double __cosr, __sinr; + double __cosr, __sinr; __asm __volatile__ ("fsincos" : "=t" (__cosr), "=u" (__sinr) : "0" (radians)); *sine = __sinr; @@ -629,11 +629,6 @@ template FORCEINLINE T AVG(T a, T b) // XYZ macro, for printf type functions - ex printf("%f %f %f",XYZ(myvector)); #define XYZ(v) (v).x,(v).y,(v).z -// -// Returns a clamped value in the range [min, max]. -// -#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val))) - inline float Sign( float x ) { return fsel( x, 1.0f, -1.0f ); // x >= 0 ? 1.0f : -1.0f diff --git a/public/tier0/threadtools.h b/public/tier0/threadtools.h index 89b6ed3e..2fc5b7a9 100644 --- a/public/tier0/threadtools.h +++ b/public/tier0/threadtools.h @@ -683,7 +683,7 @@ private: return false; ThreadMemoryBarrier(); - ++m_depth; + m_depth = m_depth + 1; return true; } @@ -744,7 +744,7 @@ public: DebuggerBreak(); #endif - --m_depth; + m_depth = m_depth - 1; if ( !m_depth ) { ThreadMemoryBarrier();