MCPcopy Create free account
hub / github.com/cinder/Cinder / erase

Method erase

include/nlohmann/ordered_map.hpp:89–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 size_type erase(const Key& key)
90 {
91 for (auto it = this->begin(); it != this->end(); ++it)
92 {
93 if (it->first == key)
94 {
95 // Since we cannot move const Keys, re-construct them in place
96 for (auto next = it; ++next != this->end(); ++it)
97 {
98 it->~value_type(); // Destroy but keep allocation
99 new (&*it) value_type{std::move(*next)};
100 }
101 Container::pop_back();
102 return 1;
103 }
104 }
105 return 0;
106 }
107
108 iterator erase(iterator pos)
109 {

Callers 3

eraseFunction · 0.45
patchFunction · 0.45
end_objectMethod · 0.45

Calls 10

pop_backFunction · 0.85
eraseFunction · 0.70
beginFunction · 0.70
endFunction · 0.70
nextFunction · 0.50
distanceFunction · 0.50
resizeFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected