1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

KeyValues update on 6/24/2022 (#102)

* to get around gcc compilation

* KeyValues update on 6/24/2022

* I should initialize the additional varaibles

* correct vtable destructor

* remove unknown1 virtual
This commit is contained in:
PerfectLaugh 2022-06-24 21:23:27 +08:00 committed by GitHub
parent 6eb8f5b2f6
commit a5dbb62fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 4 deletions

View File

@ -1,4 +1,4 @@
//========== Copyright © 2005, Valve Corporation, All rights reserved. ========
//========== Copyright <EFBFBD> 2005, Valve Corporation, All rights reserved. ========
//
// Purpose: A collection of utility classes to simplify thread handling, and
// as much as possible contain portability problems. Here avoiding
@ -1135,7 +1135,13 @@ 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() {
COMPILE_TIME_ASSERT( sizeof( LockInfo_t ) == sizeof( int64 ) );
Assert( (intp)this % 8 == 0 );
m_lockInfo.m_writerId = 0;
m_lockInfo.m_nReaders = 0;
m_lockInfo.m_i64 = 0;
}
bool TryLockForWrite();
bool TryLockForRead();

View File

@ -342,6 +342,9 @@ private:
char m_bHasEscapeSequences; // true, if while parsing this KeyValue, Escape Sequences are used (default false)
uint16 m_iKeyNameCaseSensitive2; // 2nd part of case sensitive symbol defined in KeyValueSystem;
uint32 m_iUnk1;
uint32 m_iUnk2;
KeyValues *m_pPeer; // pointer to next key in list
KeyValues *m_pSub; // pointer to Start of a new sub key list
KeyValues *m_pChain;// Search here if it's not in our list

View File

@ -1,4 +1,4 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright <EFBFBD> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
@ -23,6 +23,8 @@ typedef int HKeySymbol;
class IKeyValuesSystem
{
public:
virtual ~IKeyValuesSystem() = 0;
// registers the size of the KeyValues in the specified instance
// so it can build a properly sized memory pool for the KeyValues objects
// the sizes will usually never differ but this is for versioning safety

View File

@ -1,4 +1,4 @@
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright <EFBFBD> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
@ -300,6 +300,9 @@ void KeyValues::Init()
m_pValue = NULL;
m_bHasEscapeSequences = false;
m_iUnk1 = 0;
m_iUnk2 = 0;
}
//-----------------------------------------------------------------------------