mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 04:26:03 +08:00
Updated IKeyValuesSystem.
This commit is contained in:
@ -29,7 +29,7 @@ public:
|
|||||||
virtual void RegisterSizeofKeyValues(int size) = 0;
|
virtual void RegisterSizeofKeyValues(int size) = 0;
|
||||||
|
|
||||||
// allocates/frees a KeyValues object from the shared mempool
|
// allocates/frees a KeyValues object from the shared mempool
|
||||||
virtual void *AllocKeyValuesMemory(int size) = 0;
|
virtual void *AllocKeyValuesMemory() = 0;
|
||||||
virtual void FreeKeyValuesMemory(void *pMem) = 0;
|
virtual void FreeKeyValuesMemory(void *pMem) = 0;
|
||||||
|
|
||||||
// symbol table access (used for key names)
|
// symbol table access (used for key names)
|
||||||
|
@ -2343,13 +2343,13 @@ bool KeyValues::ReadAsBinary( CUtlBuffer &buffer )
|
|||||||
void *KeyValues::operator new( size_t iAllocSize )
|
void *KeyValues::operator new( size_t iAllocSize )
|
||||||
{
|
{
|
||||||
MEM_ALLOC_CREDIT();
|
MEM_ALLOC_CREDIT();
|
||||||
return KeyValuesSystem()->AllocKeyValuesMemory(iAllocSize);
|
return KeyValuesSystem()->AllocKeyValuesMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
void *KeyValues::operator new( size_t iAllocSize, int nBlockUse, const char *pFileName, int nLine )
|
void *KeyValues::operator new( size_t iAllocSize, int nBlockUse, const char *pFileName, int nLine )
|
||||||
{
|
{
|
||||||
MemAlloc_PushAllocDbgInfo( pFileName, nLine );
|
MemAlloc_PushAllocDbgInfo( pFileName, nLine );
|
||||||
void *p = KeyValuesSystem()->AllocKeyValuesMemory(iAllocSize);
|
void *p = KeyValuesSystem()->AllocKeyValuesMemory();
|
||||||
MemAlloc_PopAllocDbgInfo();
|
MemAlloc_PopAllocDbgInfo();
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user