mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
/W4: Fix compiler compatibility
Clang doesn't support function-style casts with types containing a space.
This commit is contained in:
parent
4e7693bae6
commit
b0d2665550
@ -119,7 +119,7 @@ __int64 __fastcall Mod_GetQueuedPakHandle(char* a1, char* a2, __int64 a3)
|
||||
while ((v10[-v4] & 0xC0) == 0x80);
|
||||
}
|
||||
v11 = &v10[-v4];
|
||||
if (v4 != signed int(((0xE5000000 >> (((unsigned __int8)*v11 >> 3) & 0x1E)) & 3)))
|
||||
if (v4 != (signed int)((0xE5000000 >> (((unsigned __int8)*v11 >> 3) & 0x1E)) & 3))
|
||||
{
|
||||
*v11 = 0;
|
||||
v5 -= v4;
|
||||
|
@ -533,7 +533,7 @@ int CAI_Utility::GetNearestNodeToPos(const CAI_Network* pAINetwork, const Vector
|
||||
v3 = pAINetwork->m_iNumScriptNodes;
|
||||
v4 = 0i64;
|
||||
v5 = 640000.0;
|
||||
v6 = unsigned int(NO_NODE);
|
||||
v6 = (unsigned int)NO_NODE;
|
||||
if (v3 >= 4)
|
||||
{
|
||||
v7 = pAINetwork->m_ScriptNode;
|
||||
|
@ -1741,7 +1741,7 @@ FORCEINLINE unsigned char RoundFloatToByte(float f)
|
||||
#ifdef Assert
|
||||
Assert(nResult >= 0 && nResult <= 255);
|
||||
#endif
|
||||
return unsigned char(nResult);
|
||||
return (unsigned char)nResult;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -901,10 +901,10 @@ bool ConVar::SetColorFromString(const char* pszValue)
|
||||
|
||||
// Stuff all the values into each byte of our int.
|
||||
unsigned char* pColorElement = (reinterpret_cast<unsigned char*>(&m_Value.m_nValue));
|
||||
pColorElement[0] = unsigned char(nRGBA[0]);
|
||||
pColorElement[1] = unsigned char(nRGBA[1]);
|
||||
pColorElement[2] = unsigned char(nRGBA[2]);
|
||||
pColorElement[3] = unsigned char(nRGBA[3]);
|
||||
pColorElement[0] = (unsigned char)nRGBA[0];
|
||||
pColorElement[1] = (unsigned char)nRGBA[1];
|
||||
pColorElement[2] = (unsigned char)nRGBA[2];
|
||||
pColorElement[3] = (unsigned char)nRGBA[3];
|
||||
|
||||
// Copy that value into our float.
|
||||
m_Value.m_fValue = static_cast<float>(m_Value.m_nValue);
|
||||
|
@ -203,7 +203,7 @@ CUtlBuffer::CUtlBuffer(int64 growSize, int64 initSize, int nFlags) :
|
||||
m_Put = 0;
|
||||
m_nTab = 0;
|
||||
m_nOffset = 0;
|
||||
m_Flags = unsigned char(nFlags);
|
||||
m_Flags = (unsigned char)nFlags;
|
||||
if ((initSize != 0) && !IsReadOnly())
|
||||
{
|
||||
m_nMaxPut = -1;
|
||||
@ -225,7 +225,7 @@ CUtlBuffer::CUtlBuffer(const void* pBuffer, int64 nSize, int nFlags) :
|
||||
m_Put = 0;
|
||||
m_nTab = 0;
|
||||
m_nOffset = 0;
|
||||
m_Flags = unsigned char(nFlags);
|
||||
m_Flags = (unsigned char)nFlags;
|
||||
if (IsReadOnly())
|
||||
{
|
||||
m_nMaxPut = m_Put = nSize;
|
||||
@ -399,7 +399,7 @@ void CUtlBuffer::SetExternalBuffer(void* pMemory, int64 nSize, int64 nInitialPut
|
||||
m_nTab = 0;
|
||||
m_Error = 0;
|
||||
m_nOffset = 0;
|
||||
m_Flags = unsigned char(nFlags);
|
||||
m_Flags = (unsigned char)nFlags;
|
||||
m_nMaxPut = -1;
|
||||
AddNullTermination(m_Put);
|
||||
}
|
||||
@ -417,7 +417,7 @@ void CUtlBuffer::AssumeMemory(void* pMemory, int64 nSize, int64 nInitialPut, int
|
||||
m_nTab = 0;
|
||||
m_Error = 0;
|
||||
m_nOffset = 0;
|
||||
m_Flags = unsigned char(nFlags);
|
||||
m_Flags = (unsigned char)nFlags;
|
||||
m_nMaxPut = -1;
|
||||
AddNullTermination(m_Put);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ void CUtlString::ToUpper()
|
||||
{
|
||||
for ( int64 nLength = Length() - 1; nLength >= 0; nLength--)
|
||||
{
|
||||
m_Storage[nLength] = unsigned char(toupper( m_Storage[ nLength ] ));
|
||||
m_Storage[nLength] = (unsigned char)toupper( m_Storage[ nLength ] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ void CUtlString::ToLower()
|
||||
{
|
||||
for( int64 nLength = Length() - 1; nLength >= 0; nLength-- )
|
||||
{
|
||||
m_Storage[ nLength ] = unsigned char(tolower( m_Storage[ nLength ] ));
|
||||
m_Storage[ nLength ] = (unsigned char)tolower( m_Storage[ nLength ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user