From 00c524519ef6c7ceaf4ac91307617cfd65d7cf21 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 19 Jul 2014 14:53:41 +0200 Subject: Fixed style: spaces after commas. --- src/OSSupport/Thread.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/OSSupport/Thread.cpp') diff --git a/src/OSSupport/Thread.cpp b/src/OSSupport/Thread.cpp index 084e0810e..163c9b0c9 100644 --- a/src/OSSupport/Thread.cpp +++ b/src/OSSupport/Thread.cpp @@ -92,11 +92,11 @@ void cThread::Start( bool a_bWaitOnDelete /* = true */ ) #else DWORD ThreadID = 0; HANDLE hThread = CreateThread(NULL // security - ,0 // stack size + , 0 // stack size , (LPTHREAD_START_ROUTINE) MyThread // function name - ,this // parameters - ,0 // flags - ,&ThreadID ); // thread id + , this // parameters + , 0 // flags + , &ThreadID ); // thread id CloseHandle( hThread ); #ifdef _MSC_VER -- cgit v1.2.3 From 6be79575fd50e37ac275bd0cb9d16f9e51e8a225 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 20 Jul 2014 23:10:31 +0200 Subject: Style: Normalized spaces after if, for and while. --- src/OSSupport/Thread.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/OSSupport/Thread.cpp') diff --git a/src/OSSupport/Thread.cpp b/src/OSSupport/Thread.cpp index 163c9b0c9..811e7cb21 100644 --- a/src/OSSupport/Thread.cpp +++ b/src/OSSupport/Thread.cpp @@ -53,7 +53,7 @@ cThread::cThread( ThreadFunc a_ThreadFunction, void* a_Param, const char* a_Thre , m_Event( new cEvent() ) , m_StopEvent( 0 ) { - if( a_ThreadName ) + if (a_ThreadName ) { m_ThreadName.assign(a_ThreadName); } @@ -68,7 +68,7 @@ cThread::~cThread() delete m_Event; m_Event = NULL; - if( m_StopEvent ) + if (m_StopEvent ) { m_StopEvent->Wait(); delete m_StopEvent; @@ -82,12 +82,12 @@ cThread::~cThread() void cThread::Start( bool a_bWaitOnDelete /* = true */ ) { - if( a_bWaitOnDelete ) + if (a_bWaitOnDelete ) m_StopEvent = new cEvent(); #ifndef _WIN32 pthread_t SndThread; - if( pthread_create( &SndThread, NULL, MyThread, this) ) + if (pthread_create( &SndThread, NULL, MyThread, this) ) LOGERROR("ERROR: Could not create thread!"); #else DWORD ThreadID = 0; @@ -132,6 +132,6 @@ void *cThread::MyThread( void *a_Param ) ThreadFunction( ThreadParam ); - if( StopEvent ) StopEvent->Set(); + if (StopEvent ) StopEvent->Set(); return 0; } -- cgit v1.2.3 From 93d29555e58df172bafba530afbc593c16ec66a3 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 21 Jul 2014 15:19:48 +0200 Subject: Style: Normalized to no spaces before closing parenthesis. --- src/OSSupport/Thread.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/OSSupport/Thread.cpp') diff --git a/src/OSSupport/Thread.cpp b/src/OSSupport/Thread.cpp index 811e7cb21..faaccce96 100644 --- a/src/OSSupport/Thread.cpp +++ b/src/OSSupport/Thread.cpp @@ -47,13 +47,13 @@ static void SetThreadName(DWORD dwThreadID, const char * threadName) -cThread::cThread( ThreadFunc a_ThreadFunction, void* a_Param, const char* a_ThreadName /* = 0 */ ) - : m_ThreadFunction( a_ThreadFunction ) - , m_Param( a_Param ) - , m_Event( new cEvent() ) - , m_StopEvent( 0 ) +cThread::cThread( ThreadFunc a_ThreadFunction, void* a_Param, const char* a_ThreadName /* = 0 */) + : m_ThreadFunction( a_ThreadFunction) + , m_Param( a_Param) + , m_Event( new cEvent()) + , m_StopEvent( 0) { - if (a_ThreadName ) + if (a_ThreadName) { m_ThreadName.assign(a_ThreadName); } @@ -68,7 +68,7 @@ cThread::~cThread() delete m_Event; m_Event = NULL; - if (m_StopEvent ) + if (m_StopEvent) { m_StopEvent->Wait(); delete m_StopEvent; @@ -80,14 +80,14 @@ cThread::~cThread() -void cThread::Start( bool a_bWaitOnDelete /* = true */ ) +void cThread::Start( bool a_bWaitOnDelete /* = true */) { - if (a_bWaitOnDelete ) + if (a_bWaitOnDelete) m_StopEvent = new cEvent(); #ifndef _WIN32 pthread_t SndThread; - if (pthread_create( &SndThread, NULL, MyThread, this) ) + if (pthread_create( &SndThread, NULL, MyThread, this)) LOGERROR("ERROR: Could not create thread!"); #else DWORD ThreadID = 0; @@ -96,8 +96,8 @@ void cThread::Start( bool a_bWaitOnDelete /* = true */ ) , (LPTHREAD_START_ROUTINE) MyThread // function name , this // parameters , 0 // flags - , &ThreadID ); // thread id - CloseHandle( hThread ); + , &ThreadID); // thread id + CloseHandle( hThread); #ifdef _MSC_VER if (!m_ThreadName.empty()) @@ -116,9 +116,9 @@ void cThread::Start( bool a_bWaitOnDelete /* = true */ ) #ifdef _WIN32 -unsigned long cThread::MyThread(void* a_Param ) +unsigned long cThread::MyThread(void* a_Param) #else -void *cThread::MyThread( void *a_Param ) +void *cThread::MyThread( void *a_Param) #endif { cThread* self = (cThread*)a_Param; @@ -130,8 +130,8 @@ void *cThread::MyThread( void *a_Param ) // Set event to let other thread know this thread has been created and it's safe to delete the cThread object self->m_Event->Set(); - ThreadFunction( ThreadParam ); + ThreadFunction( ThreadParam); - if (StopEvent ) StopEvent->Set(); + if (StopEvent) StopEvent->Set(); return 0; } -- cgit v1.2.3