MCPcopy Create free account
hub / github.com/FastLED/FastLED / insert_or_update

Method insert_or_update

src/fl/stl/unordered_map_small.h:425–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423 }
424
425 fl::pair<iterator, bool> insert_or_update(const Key& key, const Value& value) FL_NOEXCEPT {
426 size_type idx = find_index(key);
427 if (idx != npos()) {
428 mData[idx].second = value;
429 return fl::pair<iterator, bool>(iterator(this, idx), false);
430 }
431 idx = do_insert(value_type(key, value));
432 return fl::pair<iterator, bool>(iterator(this, idx), true);
433 }
434
435 bool update(const Key& key, const Value& value) FL_NOEXCEPT {
436 size_type idx = find_index(key);

Callers

nothing calls this directly

Calls 2

find_indexFunction · 0.85
iteratorClass · 0.70

Tested by

no test coverage detected