FastLED
3.9.15
Loading...
Searching...
No Matches
◆
update()
[2/2]
template<typename
Key
, typename Value, fl::size N>
bool
fl::FixedMap
<
Key
, Value, N >::update
(
const
Key
&
key
,
Value &&
value
,
bool
insert_if_missing
=
true
)
inline
Definition at line
186
of file
map.h
.
187
{
188
iterator
it
=
find
(
key
);
189
if
(
it
!=
end
()) {
190
it
->second =
fl::move
(
value
);
191
return
true
;
192
}
else
if
(
insert_if_missing
) {
193
return
insert
(
key
,
fl::move
(
value
)).first;
194
}
195
return
false
;
196
}
fl::FixedMap::iterator
VectorType::iterator iterator
Definition
map.h:29
fl::FixedMap::end
iterator end()
Definition
map.h:36
fl::FixedMap::insert
pair< bool, iterator > insert(const Key &key, const Value &value, InsertResult *result=nullptr)
Definition
map.h:125
fl::FixedMap::find
iterator find(const Key &key)
Definition
map.h:40
fl::FixedMap
Definition
map.h:24
fl::move
constexpr remove_reference< T >::type && move(T &&t) noexcept
Definition
move.h:27
fl
FixedMap
Generated on Fri Aug 22 2025 20:59:36 for FastLED by
1.13.2