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

Method insert

src/fl/stl/unordered_map_small.h:291–298  ·  view source on GitHub ↗

Insertion — does NOT overwrite if key exists

Source from the content-addressed store, hash-verified

289
290 // Insertion — does NOT overwrite if key exists
291 fl::pair<iterator, bool> insert(const value_type& kv) FL_NOEXCEPT {
292 size_type idx = find_index(kv.first);
293 if (idx != npos()) {
294 return fl::pair<iterator, bool>(iterator(this, idx), false);
295 }
296 idx = do_insert(kv);
297 return fl::pair<iterator, bool>(iterator(this, idx), true);
298 }
299
300 fl::pair<iterator, bool> insert(value_type&& kv) FL_NOEXCEPT {
301 size_type idx = find_index(kv.first);

Callers

nothing calls this directly

Calls 2

find_indexFunction · 0.85
iteratorClass · 0.70

Tested by

no test coverage detected