FastLED 3.9.15
Loading...
Searching...
No Matches

◆ erase() [3/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 ( iterator it)
inline

Definition at line 555 of file unordered_map.h.

555 {
556 if (it == end() || it._map != this) {
557 return end(); // Invalid iterator
558 }
559
560 // Mark the current position as deleted
561 mark_deleted(it._idx);
562 --_size;
563 ++_tombstones;
564
565 // Advance to next valid element and return iterator to it
566 ++it._idx;
567 it.advance_to_occupied();
568 return it;
569 }
void mark_deleted(fl::size idx)