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

Method insert

src/fl/stl/map.h:125–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 pair<bool, iterator> insert(const Key &key, const Value &value,
126 insert_result *result = nullptr) {
127 iterator it = find(key);
128 if (it != end()) {
129 if (result) {
130 *result = exists;
131 }
132 return {false, it};
133 }
134 if (data.size() < N) {
135 data.push_back(PairKV(key, value));
136 if (result) {
137 *result = inserted;
138 }
139 return {true, data.end() - 1};
140 }
141 if (result) {
142 *result = at_capacity;
143 }
144 return {false, end()};
145 }
146
147 pair<bool, iterator> insert(Key &&key, Value &&value,
148 insert_result *result = nullptr) {

Callers

nothing calls this directly

Calls 5

findFunction · 0.70
endFunction · 0.70
sizeMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected