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

◆ update() [1/2]

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

Definition at line 169 of file map.h.

170 {
171 iterator it = find(key);
172 if (it != end()) {
173 it->second = value;
174 return true;
175 } else if (insert_if_missing) {
176 return insert(key, value).first;
177 }
178 return false;
179 }
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

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

+ Here is the call graph for this function: