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
209
of file
map.h
.
209
{
210
const_iterator
it
=
find
(
key
);
211
if
(
it
!=
end
()) {
212
if
(
it
!=
begin
()) {
213
--
it
;
214
*
prev_key
=
it
->first;
215
return
true
;
216
}
else
if
(
allow_rollover
&& !
empty
()) {
217
*
prev_key
=
data
[
data
.size() - 1].first;
218
return
true
;
219
}
220
}
221
return
false
;
222
}
fl::FixedMap::end
iterator end()
Definition
map.h:44
fl::FixedMap::data
VectorType data
Definition
map.h:252
fl::FixedMap::begin
iterator begin()
Definition
map.h:41
fl::FixedMap::find
iterator find(const Key &key)
Definition
map.h:54
fl::FixedMap::empty
constexpr bool empty() const
Definition
map.h:230
fl::FixedMap::const_iterator
VectorType::const_iterator const_iterator
Definition
map.h:35
fl::FixedMap
Definition
map.h:29
fl
FixedMap
Generated on Fri Apr 18 2025 03:39:32 for FastLED by
1.13.2