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

◆ prev()

template<typename Key, typename Value, fl::size N>
bool fl::unsorted_map_fixed< Key, Value, N >::prev ( const Key & key,
Key * prev_key,
bool allow_rollover = false ) const
inline

Definition at line 228 of file map.h.

229 {
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 }
iterator find(const Key &key) FL_NO_EXCEPT
Definition map.h:40
constexpr bool empty() const FL_NO_EXCEPT
Definition map.h:247
VectorType::const_iterator const_iterator
Definition map.h:30
VectorType data
Definition map.h:270
iterator begin() FL_NO_EXCEPT
Definition map.h:35
iterator end() FL_NO_EXCEPT
Definition map.h:36

References begin(), data, empty(), end(), find(), and fl::FL_NO_EXCEPT.

+ Here is the call graph for this function: