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

◆ find_index()

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
fl::size fl::unordered_map< Key, T, Hash, KeyEqual, INLINED_COUNT >::find_index ( const Key & key) const
inlineprivate

Definition at line 881 of file unordered_map.h.

881 {
882 const fl::size cap = _buckets.size();
883 const fl::size mask = cap - 1;
884 const fl::size h = _hash(key) & mask;
885
886 // Probe via the shared helper -- see find_slot() comment above.
887 for (fl::size i = 0; i < cap; ++i) {
889 if (is_empty(idx))
890 return npos();
892 return idx;
893 }
894
895 return npos();
896 }
bool is_occupied(fl::size idx) const FL_NO_EXCEPT
static fl::size npos() FL_NO_EXCEPT
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
bool is_empty(fl::size idx) const FL_NO_EXCEPT
FL_NO_INLINE fl::size unordered_map_probe_idx(fl::size h, fl::size i, fl::size mask, fl::size cap) FL_NO_EXCEPT