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.
| 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 | |
| 166 | private: |
| 167 | /// The contents of the queue |
no test coverage detected