FastLED 3.10.8
Loading...
Searching...
No Matches

◆ update() [2/2]

template<typename Key, typename Value, fl::size N>
bool fl::unsorted_map_fixed< Key, Value, N >::update ( const Key & key,
Value && value,
bool insert_if_missing = true )
inline

Definition at line 182 of file map.h.

183 {
184 iterator it = find(key);
185 if (it != end()) {
186 it->second = fl::move(value);
187 return true;
188 } else if (insert_if_missing) {
189 return insert(key, fl::move(value)).first;
190 }
191 return false;
192 }
iterator find(const Key &key) FL_NO_EXCEPT
Definition map.h:40
VectorType::iterator iterator
Definition map.h:29
pair< bool, iterator > insert(const Key &key, const Value &value, insert_result *result=nullptr) FL_NO_EXCEPT
Definition map.h:125
iterator end() FL_NO_EXCEPT
Definition map.h:36
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:30

References end(), find(), fl::FL_NO_EXCEPT, insert(), fl::adl_barrier::move(), and fl::type_rank< T >::value.

+ Here is the call graph for this function: