From 6cbc8453fc946743742a3c3e4cb7711d640b097f Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Mon, 3 Apr 2023 22:41:12 -0400 Subject: [PATCH] Remove m_nMallocGrowSize from CUtlMemory --- public/tier1/utlmemory.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/public/tier1/utlmemory.h b/public/tier1/utlmemory.h index 640cc00f..8ef2877c 100644 --- a/public/tier1/utlmemory.h +++ b/public/tier1/utlmemory.h @@ -170,16 +170,6 @@ public: CUtlMemoryFixedGrowable( int nGrowSize = 0, int nInitSize = SIZE ) : BaseClass( m_pFixedMemory, SIZE ) { Assert( nInitSize == 0 || nInitSize == SIZE ); - m_nMallocGrowSize = nGrowSize; - } - - void Grow( int nCount = 1 ) - { - if ( this->IsExternallyAllocated() ) - { - this->ConvertToGrowableMemory( m_nMallocGrowSize ); - } - BaseClass::Grow( nCount ); } void EnsureCapacity( int num ) @@ -187,17 +177,10 @@ public: if ( CUtlMemory::m_nAllocationCount >= num ) return; - if ( this->IsExternallyAllocated() ) - { - // Can't grow a buffer whose memory was externally allocated - this->ConvertToGrowableMemory( m_nMallocGrowSize ); - } - BaseClass::EnsureCapacity( num ); } private: - int m_nMallocGrowSize; T m_pFixedMemory[ SIZE ]; };