More warning fixes.
RageThreads.h is right now clear of Effective Violations. It may be worth studying.
This commit is contained in:
+10
-25
@@ -206,18 +206,11 @@ static ThreadSlot *GetUnknownThreadSlot()
|
||||
return g_pUnknownThreadSlot;
|
||||
}
|
||||
|
||||
RageThread::RageThread()
|
||||
{
|
||||
m_pSlot = NULL;
|
||||
m_sName = "unnamed";
|
||||
}
|
||||
RageThread::RageThread(): m_pSlot(NULL), m_sName("unnamed") {}
|
||||
|
||||
RageThread::RageThread( const RageThread &cpy )
|
||||
{
|
||||
/* Copying a thread does not start the copy. */
|
||||
m_pSlot = NULL;
|
||||
m_sName = cpy.m_sName;
|
||||
}
|
||||
/* Copying a thread does not start the copy. */
|
||||
RageThread::RageThread( const RageThread &cpy ):
|
||||
m_pSlot(NULL), m_sName(cpy.m_sName) {}
|
||||
|
||||
RageThread::~RageThread()
|
||||
{
|
||||
@@ -520,12 +513,9 @@ static set<int> *g_FreeMutexIDs = NULL;
|
||||
#endif
|
||||
|
||||
RageMutex::RageMutex( const RString &name ):
|
||||
m_sName( name )
|
||||
m_sName( name ), m_pMutex( MakeMutex (this ) ),
|
||||
m_LockedBy(GetInvalidThreadId()), m_LockCnt(0)
|
||||
{
|
||||
m_pMutex = MakeMutex( this );
|
||||
m_LockedBy = GetInvalidThreadId();
|
||||
m_LockCnt = 0;
|
||||
|
||||
|
||||
/* if( g_FreeMutexIDs == NULL )
|
||||
{
|
||||
@@ -659,7 +649,8 @@ LockMutex::LockMutex( RageMutex &pMutex, const char *file_, int line_ ):
|
||||
mutex( pMutex ),
|
||||
file( file_ ),
|
||||
line( line_ ),
|
||||
locked_at( RageTimer::GetTimeSinceStart() )
|
||||
locked_at( RageTimer::GetTimeSinceStart() ),
|
||||
locked(false) // ensure it gets locked inside.
|
||||
{
|
||||
mutex.Lock();
|
||||
locked = true;
|
||||
@@ -687,10 +678,7 @@ void LockMutex::Unlock()
|
||||
}
|
||||
|
||||
RageEvent::RageEvent( RString name ):
|
||||
RageMutex( name )
|
||||
{
|
||||
m_pEvent = MakeEvent( m_pMutex );
|
||||
}
|
||||
RageMutex( name ), m_pEvent(MakeEvent(m_pMutex)) {}
|
||||
|
||||
RageEvent::~RageEvent()
|
||||
{
|
||||
@@ -732,10 +720,7 @@ bool RageEvent::WaitTimeoutSupported() const
|
||||
}
|
||||
|
||||
RageSemaphore::RageSemaphore( RString sName, int iInitialValue ):
|
||||
m_sName( sName )
|
||||
{
|
||||
m_pSema = MakeSemaphore( iInitialValue );
|
||||
}
|
||||
m_sName( sName ), m_pSema(MakeSemaphore( iInitialValue )) {}
|
||||
|
||||
RageSemaphore::~RageSemaphore()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user