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

100 {
102 if (it != end()) {
103 if (it != begin()) {
104 --it;
105 *prev_key = *it;
106 return true;
107 } else if (allow_rollover && !empty()) {
108 *prev_key = data[data.size() - 1];
109 return true;
110 }
111 }
112 return false;
113 }
iterator find(const Key &key)
Definition set.h:39
VectorType data
Definition set.h:150
iterator end()
Definition set.h:29
iterator begin()
Definition set.h:26
VectorType::const_iterator const_iterator
Definition set.h:21
constexpr bool empty() const
Definition set.h:120

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

+ Here is the call graph for this function: