mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-22 09:38:56 +08:00
suppress: void* memset(void*, int, size_t)’ clearing an object of type ‘class CThreadSpinRWLock’ with no trivial copy-assignment; use value-initialization instead (#212)
This commit is contained in:
parent
017abba661
commit
4c27c1305c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user