From 3dc994f9dca109c0d039d6ba39480eaf67d7cc57 Mon Sep 17 00:00:00 2001 From: Kirill Kirilenko Date: Sat, 17 Jan 2015 15:12:14 +0300 Subject: Fixed CppCheck: (performance) Possible inefficient checking for emptiness. --- src/OSSupport/Queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/OSSupport') 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(); -- cgit v1.2.3