MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / removeFirst

Method removeFirst

source/core/StarOrderedSet.hpp:286–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285template <template <typename...> class Map, typename Value, typename Allocator, typename... Args>
286void OrderedSetWrapper<Map, Value, Allocator, Args...>::removeFirst() {
287 if (empty())
288 throw SetException("OrderedSet::removeFirst() called on empty OrderedSet");
289
290 auto i = m_order.begin();
291 m_map.erase(*i);
292 m_order.erase(i);
293}
294
295template <template <typename...> class Map, typename Value, typename Allocator, typename... Args>
296void OrderedSetWrapper<Map, Value, Allocator, Args...>::removeLast() {

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected