mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-14 04:31:05 +00:00
fix build with clang-20 ref #389 #433 #436 fix #379
Build / build-linux-i386 (push) Has been cancelled
Build / build-linux-amd64 (push) Has been cancelled
Build / build-android-armv7a (push) Has been cancelled
Build / build-windows-i386 (push) Has been cancelled
Build / build-windows-amd64 (push) Has been cancelled
Build / build-dedicated-windows-i386 (push) Has been cancelled
Build / build-dedicated-windows-amd64 (push) Has been cancelled
Build / build-dedicated-linux-i386 (push) Has been cancelled
Build / build-dedicated-linux-amd64 (push) Has been cancelled
Build / build-macos-amd64 (push) Has been cancelled
Build / build-dedicated-macos-amd64 (push) Has been cancelled
Tests / tests-linux-i386 (push) Has been cancelled
Tests / tests-linux-amd64 (push) Has been cancelled
Tests / tests-macos-amd64 (push) Has been cancelled
Tests / tests-windows-i386 (push) Has been cancelled
Tests / tests-windows-amd64 (push) Has been cancelled
Build / build-linux-i386 (push) Has been cancelled
Build / build-linux-amd64 (push) Has been cancelled
Build / build-android-armv7a (push) Has been cancelled
Build / build-windows-i386 (push) Has been cancelled
Build / build-windows-amd64 (push) Has been cancelled
Build / build-dedicated-windows-i386 (push) Has been cancelled
Build / build-dedicated-windows-amd64 (push) Has been cancelled
Build / build-dedicated-linux-i386 (push) Has been cancelled
Build / build-dedicated-linux-amd64 (push) Has been cancelled
Build / build-macos-amd64 (push) Has been cancelled
Build / build-dedicated-macos-amd64 (push) Has been cancelled
Tests / tests-linux-i386 (push) Has been cancelled
Tests / tests-linux-amd64 (push) Has been cancelled
Tests / tests-macos-amd64 (push) Has been cancelled
Tests / tests-windows-i386 (push) Has been cancelled
Tests / tests-windows-amd64 (push) Has been cancelled
This commit is contained in:
@@ -151,7 +151,7 @@ InitReturnVal_t CDataModel::Init( )
|
|||||||
//#define _ELEMENT_HISTOGRAM_
|
//#define _ELEMENT_HISTOGRAM_
|
||||||
#ifdef _ELEMENT_HISTOGRAM_
|
#ifdef _ELEMENT_HISTOGRAM_
|
||||||
CUtlMap< UtlSymId_t, int > g_typeHistogram( 0, 100, DefLessFunc( UtlSymId_t ) );
|
CUtlMap< UtlSymId_t, int > g_typeHistogram( 0, 100, DefLessFunc( UtlSymId_t ) );
|
||||||
#endif _ELEMENT_HISTOGRAM_
|
#endif //_ELEMENT_HISTOGRAM_
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -166,7 +166,7 @@ void CDataModel::Shutdown()
|
|||||||
Msg( "%d\t%s\n", g_typeHistogram.Element( i ), GetString( g_typeHistogram.Key( i ) ) );
|
Msg( "%d\t%s\n", g_typeHistogram.Element( i ), GetString( g_typeHistogram.Key( i ) ) );
|
||||||
}
|
}
|
||||||
Msg( "\n" );
|
Msg( "\n" );
|
||||||
#endif _ELEMENT_HISTOGRAM_
|
#endif //_ELEMENT_HISTOGRAM_
|
||||||
|
|
||||||
int c = GetAllocatedElementCount();
|
int c = GetAllocatedElementCount();
|
||||||
if ( c > 0 )
|
if ( c > 0 )
|
||||||
@@ -1934,7 +1934,7 @@ CDmElement* CDataModel::CreateElement( const DmElementReference_t &ref, const ch
|
|||||||
{
|
{
|
||||||
g_typeHistogram.Insert( typeSym, 1 );
|
g_typeHistogram.Insert( typeSym, 1 );
|
||||||
}
|
}
|
||||||
#endif _ELEMENT_HISTOGRAM_
|
#endif //_ELEMENT_HISTOGRAM_
|
||||||
}
|
}
|
||||||
|
|
||||||
return pElement;
|
return pElement;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public:
|
|||||||
void Init( CDmElement *pOwner, const char *pAttributeName, int flags = 0 );
|
void Init( CDmElement *pOwner, const char *pAttributeName, int flags = 0 );
|
||||||
|
|
||||||
// Returns the type of elements allowed into this attribute. UTL_INVAL_SYMBOL allows everything.
|
// Returns the type of elements allowed into this attribute. UTL_INVAL_SYMBOL allows everything.
|
||||||
UtlSymId_t GetElementType() const;
|
//UtlSymId_t GetElementType() const;
|
||||||
|
|
||||||
// Get/set
|
// Get/set
|
||||||
void Set( T* pElement );
|
void Set( T* pElement );
|
||||||
@@ -1149,11 +1149,13 @@ inline void CDmaElement<T>::Init( CDmElement *pOwner, const char *pAttributeName
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
template <class T>
|
template <class T>
|
||||||
inline UtlSymId_t CDmaElement<T>::GetElementType() const
|
inline UtlSymId_t CDmaElement<T>::GetElementType() const
|
||||||
{
|
{
|
||||||
return this->Data().m_ElementType;
|
return this->Data().m_ElementType;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline T* CDmaElement<T>::GetElement() const
|
inline T* CDmaElement<T>::GetElement() const
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ protected:
|
|||||||
|
|
||||||
T** m_pMemory;
|
T** m_pMemory;
|
||||||
int m_nBlocks;
|
int m_nBlocks;
|
||||||
int m_nIndexMask : 27;
|
int m_nIndexMask;
|
||||||
int m_nIndexShift : 5;
|
int m_nIndexShift;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -130,17 +130,16 @@ CUtlBlockMemory<T,I>::~CUtlBlockMemory()
|
|||||||
Purge();
|
Purge();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Fast swap
|
// Fast swap
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template< class T, class I >
|
template< class T, class I >
|
||||||
void CUtlBlockMemory<T,I>::Swap( CUtlBlockMemory< T, I > &mem )
|
void CUtlBlockMemory<T,I>::Swap( CUtlBlockMemory< T, I > &mem )
|
||||||
{
|
{
|
||||||
this->swap( m_pMemory, mem.m_pMemory );
|
V_swap( m_pMemory, mem.m_pMemory );
|
||||||
this->swap( m_nBlocks, mem.m_nBlocks );
|
V_swap( m_nBlocks, mem.m_nBlocks );
|
||||||
this->swap( m_nIndexMask, mem.m_nIndexMask );
|
V_swap( m_nIndexMask, mem.m_nIndexMask );
|
||||||
this->swap( m_nIndexShift, mem.m_nIndexShift );
|
V_swap( m_nIndexShift, mem.m_nIndexShift );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user