summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LightingThread.cpp2
-rw-r--r--src/MobProximityCounter.cpp2
-rw-r--r--src/OSSupport/Queue.h4
-rw-r--r--src/Server.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp
index ced95d4e1..effde03d0 100644
--- a/src/LightingThread.cpp
+++ b/src/LightingThread.cpp
@@ -197,7 +197,7 @@ void cLightingThread::Execute(void)
{
{
cCSLock Lock(m_CS);
- if (m_Queue.size() == 0)
+ if (m_Queue.empty())
{
cCSUnlock Unlock(Lock);
m_evtItemAdded.Wait();
diff --git a/src/MobProximityCounter.cpp b/src/MobProximityCounter.cpp
index 82ba771ff..cfd52440b 100644
--- a/src/MobProximityCounter.cpp
+++ b/src/MobProximityCounter.cpp
@@ -50,7 +50,7 @@ cMobProximityCounter::sIterablePair cMobProximityCounter::getMobWithinThosesDist
a_DistanceMin *= a_DistanceMin;// this is because is use square distance
a_DistanceMax *= a_DistanceMax;
- if (m_DistanceToMonster.size() <= 0)
+ if (m_DistanceToMonster.empty())
{
convertMaps();
}
diff --git a/src/OSSupport/Queue.h b/src/OSSupport/Queue.h
index 82f221453..afbde1b0d 100644
--- a/src/OSSupport/Queue.h
+++ b/src/OSSupport/Queue.h
@@ -86,7 +86,7 @@ public:
bool TryDequeueItem(ItemType & item)
{
cCSLock Lock(m_CS);
- if (m_Contents.size() == 0)
+ if (m_Contents.empty())
{
return false;
}
@@ -101,7 +101,7 @@ public:
ItemType DequeueItem(void)
{
cCSLock Lock(m_CS);
- while (m_Contents.size() == 0)
+ while (m_Contents.empty())
{
cCSUnlock Unlock(Lock);
m_evtAdded.Wait();
diff --git a/src/Server.cpp b/src/Server.cpp
index 3eaf6e096..4dbe59ac6 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -764,7 +764,7 @@ void cServer::cNotifyWriteThread::Execute(void)
while (!m_ShouldTerminate)
{
cCSLock Lock(m_CS);
- while (m_Clients.size() == 0)
+ while (m_Clients.empty())
{
cCSUnlock Unlock(Lock);
m_Event.Wait();