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

References begin(), data, empty(), end(), and find().

+ Here is the call graph for this function: