FastLED 3.9.15
Loading...
Searching...
No Matches

◆ prev()

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

Definition at line 133 of file set.h.

134 {
136 if (it != end()) {
137 if (it != begin()) {
138 --it;
139 *prev_key = *it;
140 return true;
141 } else if (allow_rollover && !empty()) {
142 *prev_key = data[data.size() - 1];
143 return true;
144 }
145 }
146 return false;
147 }
iterator end()
Definition set.h:40
constexpr bool empty() const
Definition set.h:152
VectorType data
Definition set.h:169
VectorType::const_iterator const_iterator
Definition set.h:34
iterator begin()
Definition set.h:39
iterator find(const Key &key)
Definition set.h:44

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

+ Here is the call graph for this function: