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 135 of file set.h.

136 {
138 if (it != end()) {
139 if (it != begin()) {
140 --it;
141 *prev_key = *it;
142 return true;
143 } else if (allow_rollover && !empty()) {
144 *prev_key = data[data.size() - 1];
145 return true;
146 }
147 }
148 return false;
149 }
iterator end()
Definition set.h:42
constexpr bool empty() const
Definition set.h:154
VectorType data
Definition set.h:201
VectorType::const_iterator const_iterator
Definition set.h:36
iterator begin()
Definition set.h:41
iterator find(const Key &key)
Definition set.h:46

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

+ Here is the call graph for this function: