MCPcopy Create free account
hub / github.com/cuberite/cuberite / Remove

Method Remove

src/OSSupport/Queue.h:151–164  ·  view source on GitHub ↗

Removes the item from the queue. If there are multiple such items, only the first one is removed. Returns true if the item has been removed, false if no such item found.

Source from the content-addressed store, hash-verified

149 /// Removes the item from the queue. If there are multiple such items, only the first one is removed.
150 /// Returns true if the item has been removed, false if no such item found.
151 bool Remove(ItemType a_Item)
152 {
153 cCSLock Lock(m_CS);
154 for (iterator itr = m_Contents.begin(); itr != m_Contents.end(); ++itr)
155 {
156 if ((*itr) == a_Item)
157 {
158 m_Contents.erase(itr);
159 m_evtRemoved.Set();
160 return true;
161 }
162 }
163 return false;
164 }
165
166private:
167 /// The contents of the queue

Callers 2

UnqueueLoadMethod · 0.45
UnqueueSaveMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected