FastLED 3.9.15
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 }
VectorType::iterator iterator
Definition map.h:29
pair< bool, iterator > insert(const Key &key, const Value &value, insert_result *result=nullptr)
Definition map.h:125
iterator end()
Definition map.h:36
iterator find(const Key &key)
Definition map.h:40

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

+ Here is the call graph for this function: