diff --git a/public/tier0/threadtools.h b/public/tier0/threadtools.h index a8bf595b..d15d2715 100644 --- a/public/tier0/threadtools.h +++ b/public/tier0/threadtools.h @@ -1127,7 +1127,12 @@ private: class ALIGN8 PLATFORM_CLASS CThreadSpinRWLock { public: - CThreadSpinRWLock() { COMPILE_TIME_ASSERT( sizeof( LockInfo_t ) == sizeof( int64 ) ); Assert( (intp)this % 8 == 0 ); memset( this, 0, sizeof( *this ) ); } + + CThreadSpinRWLock() : m_lockInfo{ 0, 0 } + { + COMPILE_TIME_ASSERT(sizeof(LockInfo_t) == sizeof(int64)); + Assert((intp)this % 8 == 0); + } bool TryLockForWrite(); bool TryLockForRead();