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

Method prev

src/fl/stl/map.h:228–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 }
227
228 bool prev(const Key &key, Key *prev_key,
229 bool allow_rollover = false) const {
230 const_iterator it = find(key);
231 if (it != end()) {
232 if (it != begin()) {
233 --it;
234 *prev_key = it->first;
235 return true;
236 } else if (allow_rollover && !empty()) {
237 *prev_key = data[data.size() - 1].first;
238 return true;
239 }
240 }
241 return false;
242 }
243
244 // Get the current size of the vector
245 constexpr fl::size size() const { return data.size(); }

Callers

nothing calls this directly

Calls 5

findFunction · 0.70
endFunction · 0.70
beginFunction · 0.70
emptyFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected