From 5e198c673009cf8ca9d92cf59848999bc96bbc37 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:50:58 +0200 Subject: Basic style fixes. --- src/OSSupport/CriticalSection.cpp | 4 ++-- src/OSSupport/CriticalSection.h | 2 +- src/OSSupport/Queue.h | 4 ++-- src/OSSupport/Socket.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/OSSupport') diff --git a/src/OSSupport/CriticalSection.cpp b/src/OSSupport/CriticalSection.cpp index 6d4afce55..5dfc8b5f9 100644 --- a/src/OSSupport/CriticalSection.cpp +++ b/src/OSSupport/CriticalSection.cpp @@ -108,7 +108,7 @@ bool cCriticalSection::IsLockedByCurrentThread(void) //////////////////////////////////////////////////////////////////////////////// // cCSLock -cCSLock::cCSLock(cCriticalSection * a_CS) +cCSLock::cCSLock(cCriticalSection * a_CS) : m_CS(a_CS) , m_IsLocked(false) { @@ -119,7 +119,7 @@ cCSLock::cCSLock(cCriticalSection * a_CS) -cCSLock::cCSLock(cCriticalSection & a_CS) +cCSLock::cCSLock(cCriticalSection & a_CS) : m_CS(&a_CS) , m_IsLocked(false) { diff --git a/src/OSSupport/CriticalSection.h b/src/OSSupport/CriticalSection.h index 73a71f5e1..c3c6e57f0 100644 --- a/src/OSSupport/CriticalSection.h +++ b/src/OSSupport/CriticalSection.h @@ -47,7 +47,7 @@ class cCSLock cCriticalSection * m_CS; // Unlike a cCriticalSection, this object should be used from a single thread, therefore access to m_IsLocked is not threadsafe - // In Windows, it is an error to call cCriticalSection::Unlock() multiple times if the lock is not held, + // In Windows, it is an error to call cCriticalSection::Unlock() multiple times if the lock is not held, // therefore we need to check this value whether we are locked or not. bool m_IsLocked; diff --git a/src/OSSupport/Queue.h b/src/OSSupport/Queue.h index beb6a63f1..269f9db41 100644 --- a/src/OSSupport/Queue.h +++ b/src/OSSupport/Queue.h @@ -21,7 +21,7 @@ cQueueFuncs and is used as the default behavior. /// This empty struct allows for the callback functions to be inlined template -struct cQueueFuncs +struct cQueueFuncs { public: @@ -88,7 +88,7 @@ public: cCSLock Lock(m_CS); if (m_Contents.size() == 0) { - return false; + return false; } item = m_Contents.front(); m_Contents.pop_front(); diff --git a/src/OSSupport/Socket.cpp b/src/OSSupport/Socket.cpp index 56835b518..7d4d9e598 100644 --- a/src/OSSupport/Socket.cpp +++ b/src/OSSupport/Socket.cpp @@ -244,7 +244,7 @@ cSocket cSocket::AcceptIPv6(void) // Windows XP doesn't have inet_ntop, so we need to improvise. And MSVC has different headers than GCC #ifdef _MSC_VER // MSVC version - Printf(SClient.m_IPString, "%x:%x:%x:%x:%x:%x:%x:%x", + Printf(SClient.m_IPString, "%x:%x:%x:%x:%x:%x:%x:%x", from.sin6_addr.u.Word[0], from.sin6_addr.u.Word[1], from.sin6_addr.u.Word[2], @@ -256,7 +256,7 @@ cSocket cSocket::AcceptIPv6(void) ); #else // _MSC_VER // MinGW - Printf(SClient.m_IPString, "%x:%x:%x:%x:%x:%x:%x:%x", + Printf(SClient.m_IPString, "%x:%x:%x:%x:%x:%x:%x:%x", from.sin6_addr.s6_addr16[0], from.sin6_addr.s6_addr16[1], from.sin6_addr.s6_addr16[2], -- cgit v1.2.3