mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-13 04:09:09 +00:00
fpersmissive fixes
This commit is contained in:
+3
-3
@@ -2778,7 +2778,7 @@ LUFILE *lufopen(void *z,unsigned int len,DWORD flags,ZRESULT *err)
|
||||
#ifdef _WIN32
|
||||
res = DuplicateHandle(GetCurrentProcess(),hf,GetCurrentProcess(),&h,0,FALSE,DUPLICATE_SAME_ACCESS) == TRUE;
|
||||
#else
|
||||
h = (void*) dup( (intptr_t)hf );
|
||||
h = (void*)(intptr_t) dup( (intptr_t)hf );
|
||||
res = (intptr_t) dup >= 0;
|
||||
#endif
|
||||
if (!res)
|
||||
@@ -2793,7 +2793,7 @@ LUFILE *lufopen(void *z,unsigned int len,DWORD flags,ZRESULT *err)
|
||||
h = CreateFile((const TCHAR *)z, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
h = (void*) open( (const TCHAR *)z, O_RDONLY );
|
||||
h = (void*)(intptr_t) open( (const TCHAR *)z, O_RDONLY );
|
||||
#endif
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
@@ -4198,7 +4198,7 @@ ZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags)
|
||||
h = ::CreateFile((const TCHAR*)dst, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
ze.attr, NULL);
|
||||
#else
|
||||
h = (void*) open( (const TCHAR*)dst, O_WRONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO );
|
||||
h = (void*)(intptr_t)open( (const TCHAR*)dst, O_WRONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -278,14 +278,18 @@ public:
|
||||
Vector ret(0,0,0);
|
||||
int nfaces=0;
|
||||
for(int f=0;f<6;f++)
|
||||
{
|
||||
if (face_maps[f].RGBAData)
|
||||
{
|
||||
nfaces++;
|
||||
ret+=face_maps[f].AverageColor();
|
||||
}
|
||||
if (nfaces)
|
||||
ret*=(1.0/nfaces);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (nfaces)
|
||||
ret*=(1.0/nfaces);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
float BrightestColor(void)
|
||||
@@ -293,12 +297,14 @@ public:
|
||||
float ret=0.0;
|
||||
int nfaces=0;
|
||||
for(int f=0;f<6;f++)
|
||||
{
|
||||
if (face_maps[f].RGBAData)
|
||||
{
|
||||
nfaces++;
|
||||
ret=max(ret,face_maps[f].BrightestColor());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ const char* ParseFileInternal( const char* pFileBytes, OUT_Z_CAP(nMaxTokenLen) c
|
||||
template <size_t count>
|
||||
const char* ParseFile( const char* pFileBytes, OUT_Z_ARRAY char (&pTokenOut)[count], bool* pWasQuoted, characterset_t *pCharSet = NULL, unsigned int nMaxTokenLen = (unsigned int)-1 )
|
||||
{
|
||||
(void*)nMaxTokenLen; // Avoid unreferenced variable warnings.
|
||||
return ParseFileInternal( pFileBytes, pTokenOut, pWasQuoted, pCharSet, count );
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ INLINE_ON_PS3 const char *CThread::GetName()
|
||||
#elif defined( _PS3 )
|
||||
snprintf( m_szName, sizeof(m_szName) - 1, "Thread(%p)", this );
|
||||
#elif defined( POSIX )
|
||||
_snprintf( m_szName, sizeof(m_szName) - 1, "Thread(%p/0x%p)", this, m_threadId );
|
||||
_snprintf( m_szName, sizeof(m_szName) - 1, "Thread(%p/0x%p)", this, (void*)m_threadId );
|
||||
#endif
|
||||
m_szName[sizeof(m_szName) - 1] = 0;
|
||||
}
|
||||
|
||||
@@ -121,9 +121,6 @@ public:
|
||||
I Alloc( bool multilist = false );
|
||||
void Free( I elem );
|
||||
|
||||
// Identify the owner of this linked list's memory:
|
||||
void SetAllocOwner( const char *pszAllocOwner );
|
||||
|
||||
// list modification
|
||||
void LinkBefore( I before, I elem );
|
||||
void LinkAfter( I after, I elem );
|
||||
@@ -618,12 +615,6 @@ void CUtlLinkedList<T,S,ML,I,M>::SetGrowSize( int growSize )
|
||||
ResetDbgInfo();
|
||||
}
|
||||
|
||||
template< class T, class S, bool ML, class I, class M >
|
||||
void CUtlLinkedList<T,S,ML,I,M>::SetAllocOwner( const char *pszAllocOwner )
|
||||
{
|
||||
m_Memory.SetAllocOwner( pszAllocOwner );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Deallocate memory
|
||||
|
||||
@@ -1934,11 +1934,11 @@ FORCEINLINE void GLMContext::DrawRangeElements( GLenum mode, GLuint start, GLuin
|
||||
if ( pIndexBuf->m_bPseudo )
|
||||
{
|
||||
// you have to pass actual address, not offset
|
||||
indicesActual = (void*)( (int)indicesActual + (int)pIndexBuf->m_pPseudoBuf );
|
||||
indicesActual = (void*)( (intp)indicesActual + (intp)pIndexBuf->m_pPseudoBuf );
|
||||
}
|
||||
if (pIndexBuf->m_bUsingPersistentBuffer)
|
||||
{
|
||||
indicesActual = (void*)( (int)indicesActual + (int)pIndexBuf->m_nPersistentBufferStartOffset );
|
||||
indicesActual = (void*)( (intp)indicesActual + (intp)pIndexBuf->m_nPersistentBufferStartOffset );
|
||||
}
|
||||
|
||||
//#if GLMDEBUG
|
||||
|
||||
@@ -38,7 +38,7 @@ class BuildGroup
|
||||
|
||||
public:
|
||||
BuildGroup(Panel *parentPanel, Panel *contextPanel);
|
||||
~BuildGroup();
|
||||
virtual ~BuildGroup();
|
||||
|
||||
// Toggle build mode on/off
|
||||
virtual void SetEnabled(bool state);
|
||||
|
||||
@@ -1162,7 +1162,7 @@ inline ThreadHandle_t ThreadExecuteSoloImpl( CFunctor *pFunctor, const char *psz
|
||||
hThread = CreateSimpleThread( FunctorExecuteThread, pFunctor, &threadId );
|
||||
if ( pszName )
|
||||
{
|
||||
ThreadSetDebugName( threadId, pszName );
|
||||
ThreadSetDebugName( (ThreadHandle_t)threadId, pszName );
|
||||
}
|
||||
return hThread;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user