mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-10 03:43:06 +08:00
Compatibility fixes for Clang 22
This commit is contained in:
+3
-3
@@ -448,7 +448,7 @@ typedef CBitVec<32> CDWordBitVec;
|
|||||||
template <typename BITCOUNTTYPE>
|
template <typename BITCOUNTTYPE>
|
||||||
inline CVarBitVecBase<BITCOUNTTYPE>::CVarBitVecBase()
|
inline CVarBitVecBase<BITCOUNTTYPE>::CVarBitVecBase()
|
||||||
{
|
{
|
||||||
Plat_FastMemset( this, 0, sizeof( *this ) );
|
Plat_FastMemset( (void *)this, 0, sizeof( *this ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -479,7 +479,7 @@ inline CVarBitVecBase<BITCOUNTTYPE>::CVarBitVecBase( const CVarBitVecBase<BITCOU
|
|||||||
memcpy( m_pInt, from.m_pInt, m_numInts * sizeof(int) );
|
memcpy( m_pInt, from.m_pInt, m_numInts * sizeof(int) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
memset( this, 0, sizeof( *this ) );
|
memset( (void *)this, 0, sizeof( *this ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -547,7 +547,7 @@ inline bool CVarBitVecBase<BITCOUNTTYPE>::Detach( uint32 **ppBits, int *pNumBits
|
|||||||
free( m_pInt );
|
free( m_pInt );
|
||||||
}
|
}
|
||||||
|
|
||||||
memset( this, 0, sizeof( *this ) );
|
memset( (void *)this, 0, sizeof( *this ) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -240,7 +240,7 @@ CBasePhonemeTag::CBasePhonemeTag()
|
|||||||
|
|
||||||
CBasePhonemeTag::CBasePhonemeTag( const CBasePhonemeTag& from )
|
CBasePhonemeTag::CBasePhonemeTag( const CBasePhonemeTag& from )
|
||||||
{
|
{
|
||||||
memcpy( this, &from, sizeof(*this) );
|
memcpy( (void *)this, &from, sizeof(*this) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ public:
|
|||||||
CBasePhonemeTag();
|
CBasePhonemeTag();
|
||||||
CBasePhonemeTag( const CBasePhonemeTag& from );
|
CBasePhonemeTag( const CBasePhonemeTag& from );
|
||||||
|
|
||||||
CBasePhonemeTag &operator=( const CBasePhonemeTag &from ) { memcpy( this, &from, sizeof(*this) ); return *this; }
|
CBasePhonemeTag &operator=( const CBasePhonemeTag &from ) { memcpy( (void *)this, &from, sizeof(*this) ); return *this; }
|
||||||
|
|
||||||
float GetStartTime() const { return m_flStartTime; }
|
float GetStartTime() const { return m_flStartTime; }
|
||||||
void SetStartTime( float startTime ) { m_flStartTime = startTime; }
|
void SetStartTime( float startTime ) { m_flStartTime = startTime; }
|
||||||
|
|||||||
+2
-2
@@ -3207,7 +3207,7 @@ inline int Studio_LoadVertexes( const vertexFileHeader_t *pTempVvdHdr, vertexFil
|
|||||||
|
|
||||||
// copy vertexes
|
// copy vertexes
|
||||||
memcpy(
|
memcpy(
|
||||||
(mstudiovertex_t *)((byte *)pNewVvdHdr+pNewVvdHdr->vertexDataStart) + target,
|
(void *)((mstudiovertex_t *)((byte *)pNewVvdHdr+pNewVvdHdr->vertexDataStart) + target),
|
||||||
(mstudiovertex_t *)((byte *)pTempVvdHdr+pTempVvdHdr->vertexDataStart) + pFixupTable[i].sourceVertexID,
|
(mstudiovertex_t *)((byte *)pTempVvdHdr+pTempVvdHdr->vertexDataStart) + pFixupTable[i].sourceVertexID,
|
||||||
pFixupTable[i].numVertexes*sizeof(mstudiovertex_t) );
|
pFixupTable[i].numVertexes*sizeof(mstudiovertex_t) );
|
||||||
|
|
||||||
@@ -3215,7 +3215,7 @@ inline int Studio_LoadVertexes( const vertexFileHeader_t *pTempVvdHdr, vertexFil
|
|||||||
{
|
{
|
||||||
// copy tangents
|
// copy tangents
|
||||||
memcpy(
|
memcpy(
|
||||||
(Vector4D *)((byte *)pNewVvdHdr+pNewVvdHdr->tangentDataStart) + target,
|
(void *)((Vector4D *)((byte *)pNewVvdHdr+pNewVvdHdr->tangentDataStart) + target),
|
||||||
(Vector4D *)((byte *)pTempVvdHdr+pTempVvdHdr->tangentDataStart) + pFixupTable[i].sourceVertexID,
|
(Vector4D *)((byte *)pTempVvdHdr+pTempVvdHdr->tangentDataStart) + pFixupTable[i].sourceVertexID,
|
||||||
pFixupTable[i].numVertexes*sizeof(Vector4D) );
|
pFixupTable[i].numVertexes*sizeof(Vector4D) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1186,7 +1186,7 @@ inline uint64 Plat_Rdtsc()
|
|||||||
public: \
|
public: \
|
||||||
_classname &operator=( const _classname &src ) \
|
_classname &operator=( const _classname &src ) \
|
||||||
{ \
|
{ \
|
||||||
memcpy( this, &src, sizeof(_classname) ); \
|
memcpy( (void *)this, &src, sizeof(_classname) ); \
|
||||||
return *this; \
|
return *this; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -139,8 +139,9 @@ void CUtlBlockMemory<T,I>::Swap( CUtlBlockMemory< T, I > &mem )
|
|||||||
{
|
{
|
||||||
V_swap( m_pMemory, mem.m_pMemory );
|
V_swap( m_pMemory, mem.m_pMemory );
|
||||||
V_swap( m_nBlocks, mem.m_nBlocks );
|
V_swap( m_nBlocks, mem.m_nBlocks );
|
||||||
V_swap( m_nIndexMask, mem.m_nIndexMask );
|
// Bit-fields cannot bind to non-const references; swap manually.
|
||||||
V_swap( m_nIndexShift, mem.m_nIndexShift );
|
int nIndexMask = m_nIndexMask; m_nIndexMask = mem.m_nIndexMask; mem.m_nIndexMask = nIndexMask;
|
||||||
|
int nIndexShift = m_nIndexShift; m_nIndexShift = mem.m_nIndexShift; mem.m_nIndexShift = nIndexShift;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user