FastLED 3.9.15
Loading...
Searching...
No Matches

◆ update() [2/2]

template<typename Key, typename Value, typename Less = fl::less<Key>>
void fl::SortedHeapMap< Key, Value, Less >::update ( const Key & key,
Value && value )
inline

Definition at line 491 of file map.h.

491 {
492 if (!insert(key, fl::move(value))) {
493 iterator it = find(key);
494 it->second = fl::move(value);
495 }
496 }
fl::pair< iterator, bool > insert(const value_type &value)
Definition map.h:360
SortedHeapVector< value_type, PairLess >::iterator iterator
Definition map.h:306
iterator find(const Key &key)
Definition map.h:416
constexpr remove_reference< T >::type && move(T &&t) noexcept
Definition move.h:27