MCPcopy Create free account
hub / github.com/FastLED/FastLED / find_index

Method find_index

src/fl/stl/unordered_map_small.h:112–119  ·  view source on GitHub ↗

Linear scan for key among occupied slots. Returns slot index or npos().

Source from the content-addressed store, hash-verified

110
111 // Linear scan for key among occupied slots. Returns slot index or npos().
112 size_type find_index(const Key& key) const FL_NOEXCEPT {
113 for (size_type i = 0; i < mData.size(); ++i) {
114 if (mOccupied.test(i) && mEqual(mData[i].first, key)) {
115 return i;
116 }
117 }
118 return npos();
119 }
120
121 // Find first free (unoccupied) slot, or npos() if none.
122 size_type find_free_slot() const FL_NOEXCEPT {

Callers 1

operator==Method · 0.80

Calls 2

sizeMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected