FastLED 3.9.15
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 }
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
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition s16x16x4.h:28

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

+ Here is the call graph for this function: