FastLED
3.9.15
Loading...
Searching...
No Matches
◆
prev()
template<typename
Key
, typename Value, fl::size N>
bool
fl::FixedMap
<
Key
, Value, N >::prev
(
const
Key
&
key
,
Key
*
prev_key
,
bool
allow_rollover
=
false
) const
inline
Definition at line
232
of file
map.h
.
233
{
234
const_iterator
it
=
find
(
key
);
235
if
(
it
!=
end
()) {
236
if
(
it
!=
begin
()) {
237
--
it
;
238
*
prev_key
=
it
->first;
239
return
true
;
240
}
else
if
(
allow_rollover
&& !
empty
()) {
241
*
prev_key
=
data
[
data
.size() - 1].first;
242
return
true
;
243
}
244
}
245
return
false
;
246
}
fl::FixedMap::end
iterator end()
Definition
map.h:36
fl::FixedMap::data
VectorType data
Definition
map.h:264
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:251
fl::FixedMap::const_iterator
VectorType::const_iterator const_iterator
Definition
map.h:30
fl::FixedMap
Definition
map.h:24
fl
FixedMap
Generated on Fri Aug 22 2025 20:59:36 for FastLED by
1.13.2