1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Fix compilation errors for std=c++2a (#146)

This commit is contained in:
Alexey T
2023-10-02 16:34:18 +03:00
committed by GitHub
parent 6fd990f46b
commit 5bbd47e578
2 changed files with 3 additions and 8 deletions

View File

@ -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 <class T> 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