FastLED 3.10.8
Loading...
Searching...
No Matches

◆ erase() [2/3]

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
iterator fl::unordered_map< Key, T, Hash, KeyEqual, INLINED_COUNT >::erase ( const_iterator first,
const_iterator last )
inline

Definition at line 571 of file unordered_map.h.

571 {
572 if (first._map != this || last._map != this) {
573 return end(); // Invalid iterators
574 }
575
576 // Erase each element in the range
577 // We need to convert const_iterator to iterator for the return value
578 iterator current(this, first._idx);
579 current.advance_to_occupied();
580
581 while (current != end() && current._idx < last._idx) {
583 ++current;
584 current.advance_to_occupied();
585
586 // Erase the element at idx_to_erase
588 --_size;
589 ++_tombstones;
590 }
591
592 return current;
593 }
iterator end() FL_NO_EXCEPT
void mark_deleted(fl::size idx) FL_NO_EXCEPT