Skip to content

Commit ed8209c

Browse files
committed
fix build with clang-20 ref #389 #433 #436 fix #379
1 parent 2998568 commit ed8209c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

datamodel/datamodel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ InitReturnVal_t CDataModel::Init( )
151151
//#define _ELEMENT_HISTOGRAM_
152152
#ifdef _ELEMENT_HISTOGRAM_
153153
CUtlMap< UtlSymId_t, int > g_typeHistogram( 0, 100, DefLessFunc( UtlSymId_t ) );
154-
#endif _ELEMENT_HISTOGRAM_
154+
#endif //_ELEMENT_HISTOGRAM_
155155

156156

157157
//-----------------------------------------------------------------------------
@@ -166,7 +166,7 @@ void CDataModel::Shutdown()
166166
Msg( "%d\t%s\n", g_typeHistogram.Element( i ), GetString( g_typeHistogram.Key( i ) ) );
167167
}
168168
Msg( "\n" );
169-
#endif _ELEMENT_HISTOGRAM_
169+
#endif //_ELEMENT_HISTOGRAM_
170170

171171
int c = GetAllocatedElementCount();
172172
if ( c > 0 )
@@ -1934,7 +1934,7 @@ CDmElement* CDataModel::CreateElement( const DmElementReference_t &ref, const ch
19341934
{
19351935
g_typeHistogram.Insert( typeSym, 1 );
19361936
}
1937-
#endif _ELEMENT_HISTOGRAM_
1937+
#endif //_ELEMENT_HISTOGRAM_
19381938
}
19391939

19401940
return pElement;

public/datamodel/dmattributevar.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class CDmaElement : public CDmaVar< DmElementHandle_t >
9292
void Init( CDmElement *pOwner, const char *pAttributeName, int flags = 0 );
9393

9494
// Returns the type of elements allowed into this attribute. UTL_INVAL_SYMBOL allows everything.
95-
UtlSymId_t GetElementType() const;
95+
//UtlSymId_t GetElementType() const;
9696

9797
// Get/set
9898
void Set( T* pElement );
@@ -1149,11 +1149,13 @@ inline void CDmaElement<T>::Init( CDmElement *pOwner, const char *pAttributeName
11491149
}
11501150
}
11511151

1152+
/*
11521153
template <class T>
11531154
inline UtlSymId_t CDmaElement<T>::GetElementType() const
11541155
{
11551156
return this->Data().m_ElementType;
11561157
}
1158+
*/
11571159

11581160
template <class T>
11591161
inline T* CDmaElement<T>::GetElement() const

public/tier1/utlblockmemory.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class CUtlBlockMemory
109109

110110
T** m_pMemory;
111111
int m_nBlocks;
112-
int m_nIndexMask : 27;
113-
int m_nIndexShift : 5;
112+
int m_nIndexMask;
113+
int m_nIndexShift;
114114
};
115115

116116
//-----------------------------------------------------------------------------
@@ -130,17 +130,16 @@ CUtlBlockMemory<T,I>::~CUtlBlockMemory()
130130
Purge();
131131
}
132132

133-
134133
//-----------------------------------------------------------------------------
135134
// Fast swap
136135
//-----------------------------------------------------------------------------
137136
template< class T, class I >
138137
void CUtlBlockMemory<T,I>::Swap( CUtlBlockMemory< T, I > &mem )
139138
{
140-
this->swap( m_pMemory, mem.m_pMemory );
141-
this->swap( m_nBlocks, mem.m_nBlocks );
142-
this->swap( m_nIndexMask, mem.m_nIndexMask );
143-
this->swap( m_nIndexShift, mem.m_nIndexShift );
139+
V_swap( m_pMemory, mem.m_pMemory );
140+
V_swap( m_nBlocks, mem.m_nBlocks );
141+
V_swap( m_nIndexMask, mem.m_nIndexMask );
142+
V_swap( m_nIndexShift, mem.m_nIndexShift );
144143
}
145144

146145

0 commit comments

Comments
 (0)