ReGameDLL_CS/regamedll/public/utlvector.h

555 lines
12 KiB
C
Raw Normal View History

2017-10-12 17:50:56 +03:00
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
2015-06-30 12:46:07 +03:00
#pragma once
#include "utlmemory.h"
template<class T>
2015-06-30 12:46:07 +03:00
class CUtlVector
{
public:
typedef T ElemType_t;
// constructor, destructor
2015-09-16 23:19:21 +03:00
CUtlVector(int growSize = 0, int initSize = 0);
2017-10-12 17:50:56 +03:00
CUtlVector(T *pMemory, int numElements);
2015-06-30 12:46:07 +03:00
~CUtlVector();
2015-09-16 23:19:21 +03:00
2017-10-12 17:50:56 +03:00
// features C++11 ranged based for
T *begin() { return &m_Memory[0]; }
T *end() { return &m_Memory[m_Size - 1]; }
T const *begin() const { return &m_Memory[0]; }
T const *end() const { return &m_Memory[m_Size - 1]; }
2015-06-30 12:46:07 +03:00
// Copy the array.
2017-10-12 17:50:56 +03:00
CUtlVector<T> &operator=(const CUtlVector<T> &other);
2015-06-30 12:46:07 +03:00
// element access
2017-10-12 17:50:56 +03:00
T &operator[](int i);
T const &operator[](int i) const;
T &Element(int i);
T const &Element(int i) const;
2015-06-30 12:46:07 +03:00
// Gets the base address (can change when adding elements!)
2017-10-12 17:50:56 +03:00
T *Base();
T const *Base() const;
2015-06-30 12:46:07 +03:00
// Returns the number of elements in the vector
// SIZE IS DEPRECATED!
int Count() const;
int Size() const; // don't use me!
// Is element index valid?
2015-09-16 23:19:21 +03:00
bool IsValidIndex(int i) const;
static int InvalidIndex(void);
2015-06-30 12:46:07 +03:00
// Adds an element, uses default constructor
int AddToHead();
int AddToTail();
2015-09-16 23:19:21 +03:00
int InsertBefore(int elem);
int InsertAfter(int elem);
2015-06-30 12:46:07 +03:00
// Adds an element, uses copy constructor
2017-10-12 17:50:56 +03:00
int AddToHead(T const &src);
int AddToTail(T const &src);
int InsertBefore(int elem, T const &src);
int InsertAfter(int elem, T const &src);
2015-06-30 12:46:07 +03:00
// Adds multiple elements, uses default constructor
2015-09-16 23:19:21 +03:00
int AddMultipleToHead(int num);
2017-10-12 17:50:56 +03:00
int AddMultipleToTail(int num, const T *pToCopy = nullptr);
int InsertMultipleBefore(int elem, int num, const T *pToCopy = nullptr); // If pToCopy is set, then it's an array of length 'num' and
2015-09-16 23:19:21 +03:00
int InsertMultipleAfter(int elem, int num);
2015-06-30 12:46:07 +03:00
// Calls RemoveAll() then AddMultipleToTail.
2015-09-16 23:19:21 +03:00
void SetSize(int size);
void SetCount(int count);
2015-06-30 12:46:07 +03:00
// Calls SetSize and copies each element.
2015-09-16 23:19:21 +03:00
void CopyArray(T const *pArray, int size);
2015-06-30 12:46:07 +03:00
// Add the specified array to the tail.
2015-09-16 23:19:21 +03:00
int AddVectorToTail(CUtlVector<T> const &src);
2015-06-30 12:46:07 +03:00
// Finds an element (element needs operator== defined)
2017-10-12 17:50:56 +03:00
int Find(T const &src) const;
2015-06-30 12:46:07 +03:00
2017-10-12 17:50:56 +03:00
bool HasElement(T const &src);
2015-06-30 12:46:07 +03:00
// Makes sure we have enough memory allocated to store a requested # of elements
2015-09-16 23:19:21 +03:00
void EnsureCapacity(int num);
2015-06-30 12:46:07 +03:00
// Makes sure we have at least this many elements
2015-09-16 23:19:21 +03:00
void EnsureCount(int num);
2015-06-30 12:46:07 +03:00
// Element removal
2017-10-12 17:50:56 +03:00
void FastRemove(int elem); // doesn't preserve order
void Remove(int elem); // preserves order, shifts elements
void FindAndRemove(T const &src); // removes first occurrence of src, preserves order, shifts elements
2015-09-16 23:19:21 +03:00
void RemoveMultiple(int elem, int num); // preserves order, shifts elements
2017-10-12 17:50:56 +03:00
void RemoveAll(); // doesn't deallocate memory
2015-06-30 12:46:07 +03:00
// Memory deallocation
void Purge();
// Purges the list and calls delete on each element in it.
void PurgeAndDeleteElements();
// Set the size by which it grows when it needs to allocate more memory.
2015-09-16 23:19:21 +03:00
void SetGrowSize(int size);
2015-06-30 12:46:07 +03:00
protected:
// Can't copy this unless we explicitly do it!
2017-10-12 17:50:56 +03:00
CUtlVector(CUtlVector const &vec) { assert(0); }
2015-06-30 12:46:07 +03:00
// Grows the vector
2015-09-16 23:19:21 +03:00
void GrowVector(int num = 1);
2015-06-30 12:46:07 +03:00
// Shifts elements....
2015-09-16 23:19:21 +03:00
void ShiftElementsRight(int elem, int num = 1);
void ShiftElementsLeft(int elem, int num = 1);
2015-06-30 12:46:07 +03:00
// For easier access to the elements through the debugger
void ResetDbgInfo();
CUtlMemory<T> m_Memory;
int m_Size;
// For easier access to the elements through the debugger
// it's in release builds so this can be used in libraries correctly
T *m_pElements;
};
// For easier access to the elements through the debugger
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline void CUtlVector<T>::ResetDbgInfo()
{
m_pElements = m_Memory.Base();
}
// constructor, destructor
2017-10-12 17:50:56 +03:00
template <class T>
inline CUtlVector<T>::CUtlVector(int growSize, int initSize) :
2015-06-30 12:46:07 +03:00
m_Memory(growSize, initSize), m_Size(0)
{
ResetDbgInfo();
}
2017-10-12 17:50:56 +03:00
template <class T>
inline CUtlVector<T>::CUtlVector(T *pMemory, int numElements) :
2015-06-30 12:46:07 +03:00
m_Memory(pMemory, numElements), m_Size(0)
{
ResetDbgInfo();
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline CUtlVector<T>::~CUtlVector()
{
Purge();
}
2017-10-12 17:50:56 +03:00
template <class T>
inline CUtlVector<T> &CUtlVector<T>::operator=(const CUtlVector<T> &other)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
CopyArray(other.Base(), other.Count());
2015-06-30 12:46:07 +03:00
return *this;
}
// element access
2017-10-12 17:50:56 +03:00
template <class T>
inline T &CUtlVector<T>::operator[](int i)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(i));
2015-06-30 12:46:07 +03:00
return m_Memory[i];
}
2017-10-12 17:50:56 +03:00
template <class T>
inline T const &CUtlVector<T>::operator[](int i) const
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(i));
2015-06-30 12:46:07 +03:00
return m_Memory[i];
}
2017-10-12 17:50:56 +03:00
template <class T>
inline T &CUtlVector<T>::Element(int i)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(i));
2015-06-30 12:46:07 +03:00
return m_Memory[i];
}
2017-10-12 17:50:56 +03:00
template <class T>
inline T const &CUtlVector<T>::Element(int i) const
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(i));
2015-06-30 12:46:07 +03:00
return m_Memory[i];
}
// Gets the base address (can change when adding elements!)
2017-10-12 17:50:56 +03:00
template <class T>
inline T *CUtlVector<T>::Base()
2015-06-30 12:46:07 +03:00
{
return m_Memory.Base();
}
2017-10-12 17:50:56 +03:00
template <class T>
inline T const *CUtlVector<T>::Base() const
2015-06-30 12:46:07 +03:00
{
return m_Memory.Base();
}
// Count
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline int CUtlVector<T>::Size() const
{
return m_Size;
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline int CUtlVector<T>::Count() const
{
return m_Size;
}
// Is element index valid?
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline bool CUtlVector<T>::IsValidIndex(int i) const
2015-06-30 12:46:07 +03:00
{
return (i >= 0) && (i < m_Size);
}
// Returns in invalid index
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline int CUtlVector<T>::InvalidIndex(void)
2015-06-30 12:46:07 +03:00
{
return -1;
}
// Grows the vector
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::GrowVector(int num)
2015-06-30 12:46:07 +03:00
{
if (m_Size + num - 1 >= m_Memory.NumAllocated())
{
2015-09-16 23:19:21 +03:00
m_Memory.Grow(m_Size + num - m_Memory.NumAllocated());
2015-06-30 12:46:07 +03:00
}
m_Size += num;
ResetDbgInfo();
}
// Makes sure we have enough memory allocated to store a requested # of elements
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::EnsureCapacity(int num)
2015-06-30 12:46:07 +03:00
{
m_Memory.EnsureCapacity(num);
ResetDbgInfo();
}
// Makes sure we have at least this many elements
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::EnsureCount(int num)
2015-06-30 12:46:07 +03:00
{
if (Count() < num)
2015-09-16 23:19:21 +03:00
AddMultipleToTail(num - Count());
2015-06-30 12:46:07 +03:00
}
// Shifts elements
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::ShiftElementsRight(int elem, int num)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(elem) || (m_Size == 0) || (num == 0));
2015-06-30 12:46:07 +03:00
int numToMove = m_Size - elem - num;
if ((numToMove > 0) && (num > 0))
2015-09-16 23:19:21 +03:00
memmove(&Element(elem+num), &Element(elem), numToMove * sizeof(T));
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::ShiftElementsLeft(int elem, int num)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(elem) || (m_Size == 0) || (num == 0));
2015-06-30 12:46:07 +03:00
int numToMove = m_Size - elem - num;
if ((numToMove > 0) && (num > 0))
{
2017-10-12 17:50:56 +03:00
memmove(&Element(elem), &Element(elem + num), numToMove * sizeof(T));
2015-06-30 12:46:07 +03:00
#ifdef _DEBUG
2015-09-16 23:19:21 +03:00
memset(&Element(m_Size-num), 0xDD, num * sizeof(T));
2015-06-30 12:46:07 +03:00
#endif
}
}
// Adds an element, uses default constructor
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline int CUtlVector<T>::AddToHead()
{
return InsertBefore(0);
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline int CUtlVector<T>::AddToTail()
{
2015-09-16 23:19:21 +03:00
return InsertBefore(m_Size);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline int CUtlVector<T>::InsertAfter(int elem)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertBefore(elem + 1);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
int CUtlVector<T>::InsertBefore(int elem)
2015-06-30 12:46:07 +03:00
{
// Can insert at the end
2015-09-16 23:19:21 +03:00
assert((elem == Count()) || IsValidIndex(elem));
2015-06-30 12:46:07 +03:00
GrowVector();
ShiftElementsRight(elem);
2015-09-16 23:19:21 +03:00
Construct(&Element(elem));
2015-06-30 12:46:07 +03:00
return elem;
}
// Adds an element, uses copy constructor
2017-10-12 17:50:56 +03:00
template <class T>
inline int CUtlVector<T>::AddToHead(T const &src)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertBefore(0, src);
2015-06-30 12:46:07 +03:00
}
template< class T >
2017-10-12 17:50:56 +03:00
inline int CUtlVector<T>::AddToTail(T const &src)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertBefore(m_Size, src);
2015-06-30 12:46:07 +03:00
}
template< class T >
2017-10-12 17:50:56 +03:00
inline int CUtlVector<T>::InsertAfter(int elem, T const &src)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertBefore(elem + 1, src);
2015-06-30 12:46:07 +03:00
}
template< class T >
2017-10-12 17:50:56 +03:00
int CUtlVector<T>::InsertBefore(int elem, T const &src)
2015-06-30 12:46:07 +03:00
{
// Can insert at the end
2015-09-16 23:19:21 +03:00
assert((elem == Count()) || IsValidIndex(elem));
2015-06-30 12:46:07 +03:00
GrowVector();
ShiftElementsRight(elem);
2015-09-16 23:19:21 +03:00
CopyConstruct(&Element(elem), src);
2015-06-30 12:46:07 +03:00
return elem;
}
// Adds multiple elements, uses default constructor
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline int CUtlVector<T>::AddMultipleToHead(int num)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertMultipleBefore(0, num);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline int CUtlVector<T>::AddMultipleToTail(int num, const T *pToCopy)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertMultipleBefore(m_Size, num, pToCopy);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
int CUtlVector<T>::InsertMultipleAfter(int elem, int num)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return InsertMultipleBefore(elem + 1, num);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::SetCount(int count)
2015-06-30 12:46:07 +03:00
{
RemoveAll();
2015-09-16 23:19:21 +03:00
AddMultipleToTail(count);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline void CUtlVector<T>::SetSize(int size)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
SetCount(size);
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::CopyArray(T const *pArray, int size)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
SetSize(size);
2017-10-12 17:50:56 +03:00
for(int i = 0; i < size; i++)
{
2015-06-30 12:46:07 +03:00
(*this)[i] = pArray[i];
2017-10-12 17:50:56 +03:00
}
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
int CUtlVector<T>::AddVectorToTail(CUtlVector const &src)
2015-06-30 12:46:07 +03:00
{
int base = Count();
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
// Make space.
2015-09-16 23:19:21 +03:00
AddMultipleToTail(src.Count());
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
// Copy the elements.
2017-10-12 17:50:56 +03:00
for (int i = 0; i < src.Count(); i++)
{
2015-06-30 12:46:07 +03:00
(*this)[base + i] = src[i];
2017-10-12 17:50:56 +03:00
}
2015-06-30 12:46:07 +03:00
return base;
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
inline int CUtlVector<T>::InsertMultipleBefore(int elem, int num, const T *pToInsert)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
if(num == 0)
2015-06-30 12:46:07 +03:00
return elem;
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
// Can insert at the end
2015-09-16 23:19:21 +03:00
assert((elem == Count()) || IsValidIndex(elem));
2015-06-30 12:46:07 +03:00
GrowVector(num);
ShiftElementsRight(elem, num);
// Invoke default constructors
for (int i = 0; i < num; ++i)
2017-10-12 17:50:56 +03:00
{
2015-09-16 23:19:21 +03:00
Construct(&Element(elem+i));
2017-10-12 17:50:56 +03:00
}
2015-06-30 12:46:07 +03:00
// Copy stuff in?
2015-09-16 23:19:21 +03:00
if (pToInsert)
2015-06-30 12:46:07 +03:00
{
2017-10-12 17:50:56 +03:00
for (int i = 0; i < num; i++)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
Element(elem+i) = pToInsert[i];
2015-06-30 12:46:07 +03:00
}
}
return elem;
}
// Finds an element (element needs operator== defined)
2017-10-12 17:50:56 +03:00
template <class T>
int CUtlVector<T>::Find(T const &src) const
2015-06-30 12:46:07 +03:00
{
2017-10-12 17:50:56 +03:00
for (int i = 0; i < Count(); i++)
2015-06-30 12:46:07 +03:00
{
if (Element(i) == src)
return i;
}
2017-10-12 17:50:56 +03:00
return InvalidIndex();
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
bool CUtlVector<T>::HasElement(T const &src)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
return (Find(src) >= 0);
2015-06-30 12:46:07 +03:00
}
// Element removal
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::FastRemove(int elem)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(elem));
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
Destruct(&Element(elem));
2015-06-30 12:46:07 +03:00
if (m_Size > 0)
{
2017-10-12 17:50:56 +03:00
Q_memcpy(&Element(elem), &Element(m_Size - 1), sizeof(T));
m_Size--;
2015-06-30 12:46:07 +03:00
}
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::Remove(int elem)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
Destruct(&Element(elem));
2015-06-30 12:46:07 +03:00
ShiftElementsLeft(elem);
2017-10-12 17:50:56 +03:00
m_Size--;
2015-06-30 12:46:07 +03:00
}
2017-10-12 17:50:56 +03:00
template <class T>
void CUtlVector<T>::FindAndRemove(T const &src)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
int elem = Find(src);
2017-10-12 17:50:56 +03:00
if (elem != InvalidIndex())
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
Remove(elem);
2015-06-30 12:46:07 +03:00
}
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::RemoveMultiple(int elem, int num)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
assert(IsValidIndex(elem));
assert(elem + num <= Count());
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
for (int i = elem + num; --i >= elem;)
2015-06-30 12:46:07 +03:00
Destruct(&Element(i));
ShiftElementsLeft(elem, num);
m_Size -= num;
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
void CUtlVector<T>::RemoveAll()
{
2015-09-16 23:19:21 +03:00
for (int i = m_Size; --i >= 0;)
2015-06-30 12:46:07 +03:00
Destruct(&Element(i));
m_Size = 0;
}
// Memory deallocation
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
void CUtlVector<T>::Purge()
{
RemoveAll();
2015-09-16 23:19:21 +03:00
m_Memory.Purge();
2015-06-30 12:46:07 +03:00
ResetDbgInfo();
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-06-30 12:46:07 +03:00
inline void CUtlVector<T>::PurgeAndDeleteElements()
{
for (int i = 0; i < m_Size; i++)
2015-06-30 12:46:07 +03:00
delete Element(i);
Purge();
}
2017-10-12 17:50:56 +03:00
template <class T>
2015-09-16 23:19:21 +03:00
void CUtlVector<T>::SetGrowSize(int size)
2015-06-30 12:46:07 +03:00
{
2015-09-16 23:19:21 +03:00
m_Memory.SetGrowSize(size);
2015-06-30 12:46:07 +03:00
}