FastLED 3.10.9
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 573 of file unordered_map.h.

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