summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/Queue.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-03 17:49:14 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-03 17:49:14 +0100
commit14ec68d8d309d3fdf8e0af47196b1cf8609d017d (patch)
treec66e334db636ec454af7451ce0deb7410683119e /src/OSSupport/Queue.h
parentfixed failure to return a value from Remove (diff)
downloadcuberite-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 'src/OSSupport/Queue.h')
-rw-r--r--src/OSSupport/Queue.h11
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: