mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-22 17:47:38 +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
|
class ALIGN8 PLATFORM_CLASS CThreadSpinRWLock
|
||||||
{
|
{
|
||||||
public:
|
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 TryLockForWrite();
|
||||||
bool TryLockForRead();
|
bool TryLockForRead();
|
||||||
|
Loading…
Reference in New Issue
Block a user