diff --git a/src/public/tier1/utllinkedlist.h b/src/public/tier1/utllinkedlist.h index ae75fc82..76b6ad43 100644 --- a/src/public/tier1/utllinkedlist.h +++ b/src/public/tier1/utllinkedlist.h @@ -192,7 +192,7 @@ template < class T > class CUtlFixedLinkedList : public CUtlLinkedList< T, intptr_t, true, intptr_t, CUtlFixedMemory< UtlLinkedListElem_t< T, intptr_t > > > { public: - CUtlFixedLinkedList(ssize_t growSize = 0, ssize_t initSize = 0) + CUtlFixedLinkedList(intptr_t growSize = 0, intptr_t initSize = 0) : CUtlLinkedList< T, intptr_t, true, intptr_t, CUtlFixedMemory< UtlLinkedListElem_t< T, intptr_t > > >(growSize, initSize) {} bool IsValidIndex(intptr_t i) const diff --git a/src/public/tier1/utlmap.h b/src/public/tier1/utlmap.h index 240bb4b6..e279917c 100644 --- a/src/public/tier1/utlmap.h +++ b/src/public/tier1/utlmap.h @@ -267,12 +267,12 @@ public: LessFunc_t m_LessFunc; }; - typedef CUtlRBTree CTree; + typedef CUtlRBTree CTree; CTree *AccessTree() { return &m_Tree; } protected: - CTree m_Tree; + CTree m_Tree; }; //----------------------------------------------------------------------------- diff --git a/src/public/tier1/utlrbtree.h b/src/public/tier1/utlrbtree.h index 3082fb3c..2e4bae31 100644 --- a/src/public/tier1/utlrbtree.h +++ b/src/public/tier1/utlrbtree.h @@ -151,11 +151,11 @@ public: // Left at growSize = 0, the memory will first allocate 1 element and double in size // at each increment. // LessFunc_t is required, but may be set after the constructor using SetLessFunc() below - CUtlRBTree(ssize_t growSize = 0, ssize_t initSize = 0, const LessFunc_t& lessfunc = 0); + CUtlRBTree(IndexType_t growSize = 0, IndexType_t initSize = 0, const LessFunc_t& lessfunc = 0); CUtlRBTree(const LessFunc_t& lessfunc); ~CUtlRBTree(); - void EnsureCapacity(ssize_t num); + void EnsureCapacity(IndexType_t num); // NOTE: CopyFrom is fast but dangerous! It just memcpy's all nodes - it does NOT run copy constructors, so // it is not a true deep copy (i.e 'T' must be POD for this to work - e.g CUtlString will not work). @@ -215,7 +215,7 @@ public: // NOTE: the returned 'index' will be valid as long as the element remains in the tree // (other elements being added/removed will not affect it) I Insert(T const& insert); - void Insert(const T* pArray, ssize_t nItems); + void Insert(const T* pArray, I nItems); I InsertIfNotFound(T const& insert); // Find method @@ -384,7 +384,7 @@ protected: //----------------------------------------------------------------------------- template < class T, class I, typename L, class M > -inline CUtlRBTree::CUtlRBTree(ssize_t growSize, ssize_t initSize, const LessFunc_t& lessfunc) : +inline CUtlRBTree::CUtlRBTree(IndexType_t growSize, IndexType_t initSize, const LessFunc_t& lessfunc) : m_LessFunc(lessfunc), m_Elements(growSize, initSize), m_Root(InvalidIndex()), @@ -414,7 +414,7 @@ inline CUtlRBTree::~CUtlRBTree() } template < class T, class I, typename L, class M > -inline void CUtlRBTree::EnsureCapacity(ssize_t num) +inline void CUtlRBTree::EnsureCapacity(IndexType_t num) { m_Elements.EnsureCapacity(num); } @@ -1509,7 +1509,7 @@ I CUtlRBTree::Insert(T const& insert) template < class T, class I, typename L, class M > -void CUtlRBTree::Insert(const T* pArray, ssize_t nItems) +void CUtlRBTree::Insert(const T* pArray, I nItems) { while (nItems--) { diff --git a/src/public/tier1/utlsymbol.h b/src/public/tier1/utlsymbol.h index 8c6d3146..a1bfb0bd 100644 --- a/src/public/tier1/utlsymbol.h +++ b/src/public/tier1/utlsymbol.h @@ -104,7 +104,7 @@ class CUtlSymbolTable { public: // constructor, destructor - CUtlSymbolTable( ssize_t growSize = 0, ssize_t initSize = 16, bool caseInsensitive = false ); + CUtlSymbolTable( unsigned short growSize = 0, unsigned short initSize = 16, bool caseInsensitive = false ); ~CUtlSymbolTable(); // Finds and/or creates a symbol based on the string @@ -166,7 +166,7 @@ protected: class CTree : public CUtlRBTree { public: - CTree( ssize_t growSize, ssize_t initSize ) : CUtlRBTree( growSize, initSize ) {} + CTree( unsigned short growSize, unsigned short initSize ) : CUtlRBTree( growSize, initSize ) {} friend class CUtlSymbolTable::CLess; // Needed to allow CLess to calculate pointer to symbol table }; @@ -193,13 +193,12 @@ private: friend class CLess; friend class CSymbolHash; - }; -class CUtlSymbolTableMT : public CUtlSymbolTable +class CUtlSymbolTableMT : public CUtlSymbolTable { public: - CUtlSymbolTableMT( ssize_t growSize = 0, ssize_t initSize = 32, bool caseInsensitive = false ) + CUtlSymbolTableMT( unsigned short growSize = 0, unsigned short initSize = 32, bool caseInsensitive = false ) : CUtlSymbolTable( growSize, initSize, caseInsensitive ) { } diff --git a/src/tier1/utlsymbol.cpp b/src/tier1/utlsymbol.cpp index 7d034d13..ab7326bd 100644 --- a/src/tier1/utlsymbol.cpp +++ b/src/tier1/utlsymbol.cpp @@ -228,7 +228,7 @@ int CUtlSymbolTable::CLess::operator()( const CStringPoolIndex &i1, const CStrin //----------------------------------------------------------------------------- // constructor, destructor //----------------------------------------------------------------------------- -CUtlSymbolTable::CUtlSymbolTable( ssize_t growSize, ssize_t initSize, bool caseInsensitive ) : +CUtlSymbolTable::CUtlSymbolTable( unsigned short growSize, unsigned short initSize, bool caseInsensitive ) : m_Lookup( growSize, initSize ), m_bInsensitive( caseInsensitive ), m_StringPools( 8 ), m_nUserSearchStringHash( 0 ), m_pUserSearchString( nullptr ) {