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

◆ prev()

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

Definition at line 92 of file set.h.

93 {
95 if (it != end()) {
96 if (it != begin()) {
97 --it;
98 *prev_key = *it;
99 return true;
100 } else if (allow_rollover && !empty()) {
101 *prev_key = data[data.size() - 1];
102 return true;
103 }
104 }
105 return false;
106 }
iterator find(const Key &key)
Definition set.h:30
VectorType data
Definition set.h:128
iterator end()
Definition set.h:26
iterator begin()
Definition set.h:25
VectorType::const_iterator const_iterator
Definition set.h:20
constexpr bool empty() const
Definition set.h:111

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

+ Here is the call graph for this function: