FastLED
3.10.8
Loading...
Searching...
No Matches
◆
update()
[1/2]
template<typename
Key
, typename Value, typename Less = fl::less<Key>>
bool
fl::flat_map
<
Key
, Value, Less >::update
(
const
Key
&
key
,
const Value &
value
)
inline
Definition at line
428
of file
flat_map.h
.
428
{
429
iterator
it
=
find
(
key
);
430
if
(
it
!=
end
()) {
431
it
->second =
value
;
432
return
true
;
// Updated
433
}
434
// Key doesn't exist, insert it
435
auto
result
=
insert
(
value_type
(
key
,
value
));
436
return
result
.second;
// Return whether insertion succeeded
437
}
fl::flat_map::iterator
typename vector_type::iterator iterator
Definition
flat_map.h:47
fl::flat_map::find
iterator find(const Key &key) FL_NO_EXCEPT
Definition
flat_map.h:156
fl::flat_map::value_type
fl::pair< Key, Value > value_type
Definition
flat_map.h:37
fl::flat_map::insert
fl::pair< iterator, bool > insert(const value_type &value) FL_NO_EXCEPT
Definition
flat_map.h:245
fl::flat_map::end
iterator end() FL_NO_EXCEPT
Definition
flat_map.h:86
fl::flat_map
Definition
flat_map.h:31
fl
flat_map
Generated on Sun Oct 18 2026 00:57:06 for FastLED by
1.13.2