FastLED
3.9.15
Loading...
Searching...
No Matches
◆
prev()
template<typename
Key
, typename Value, size_t N>
bool
fl::FixedMap
<
Key
, Value, N >::prev
(
const
Key
&
key
,
Key
*
prev_key
,
bool
allow_rollover
=
false
) const
inline
Definition at line
196
of file
map.h
.
197
{
198
const_iterator
it
=
find
(
key
);
199
if
(
it
!=
end
()) {
200
if
(
it
!=
begin
()) {
201
--
it
;
202
*
prev_key
=
it
->first;
203
return
true
;
204
}
else
if
(
allow_rollover
&& !
empty
()) {
205
*
prev_key
=
data
[
data
.size() - 1].first;
206
return
true
;
207
}
208
}
209
return
false
;
210
}
fl::FixedMap::end
iterator end()
Definition
map.h:36
fl::FixedMap::data
VectorType data
Definition
map.h:228
fl::FixedMap::begin
iterator begin()
Definition
map.h:35
fl::FixedMap::find
iterator find(const Key &key)
Definition
map.h:40
fl::FixedMap::empty
constexpr bool empty() const
Definition
map.h:215
fl::FixedMap::const_iterator
VectorType::const_iterator const_iterator
Definition
map.h:30
fl::FixedMap
Definition
map.h:24
fl
FixedMap
Generated on Thu May 29 2025 04:44:58 for FastLED by
1.13.2