Skip to content

[CS:GO] Fix compilation errors for std=c++2a #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: csgo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions public/mathlib/mathlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions public/tier0/threadtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ class CThreadFastMutex
return false;

ThreadMemoryBarrier();
++m_depth;
m_depth = m_depth + 1;
return true;
}

Expand Down Expand Up @@ -744,7 +744,7 @@ class CThreadFastMutex
DebuggerBreak();
#endif

--m_depth;
m_depth = m_depth - 1;
if ( !m_depth )
{
ThreadMemoryBarrier();
Expand Down