diff options
author | Kirill Kirilenko <kirill@ultracoder.org> | 2015-01-17 13:12:14 +0100 |
---|---|---|
committer | Kirill Kirilenko <kirill@ultracoder.org> | 2015-01-17 13:20:03 +0100 |
commit | 3dc994f9dca109c0d039d6ba39480eaf67d7cc57 (patch) | |
tree | 4b6d2566a2cec6804a34809313dc35c2ee83629d /src/OSSupport/Queue.h | |
parent | Fixed CppCheck: (performance) Function parameter should be passed by reference. (diff) | |
download | cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar.gz cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar.bz2 cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar.lz cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar.xz cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.tar.zst cuberite-3dc994f9dca109c0d039d6ba39480eaf67d7cc57.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/Queue.h | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |