diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-01-03 17:49:14 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-01-03 17:49:14 +0100 |
commit | 14ec68d8d309d3fdf8e0af47196b1cf8609d017d (patch) | |
tree | c66e334db636ec454af7451ce0deb7410683119e | |
parent | fixed failure to return a value from Remove (diff) | |
download | cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar.gz cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar.bz2 cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar.lz cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar.xz cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.tar.zst cuberite-14ec68d8d309d3fdf8e0af47196b1cf8609d017d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/Queue.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/OSSupport/Queue.h b/src/OSSupport/Queue.h index bf6d7e451..fc942b3e1 100644 --- a/src/OSSupport/Queue.h +++ b/src/OSSupport/Queue.h @@ -134,8 +134,15 @@ public: bool Remove(ItemType item) { cCSLock Lock(m_CS); - m_evtRemoved.Set(); - return m_contents.remove(item); + for (iterator itr = m_contents.begin(); itr != m_contents.end(); ++itr) + { + if((*itr) == a_item) { + m_contents.erase(itr); + m_evtRemoved.Set(); + return true; + } + } + return false; } private: |