MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / erase

Method erase

Source/Utils/json.hpp:16472–16489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16470 }
16471
16472 size_type erase(const Key& key)
16473 {
16474 for (auto it = this->begin(); it != this->end(); ++it)
16475 {
16476 if (it->first == key)
16477 {
16478 // Since we cannot move const Keys, re-construct them in place
16479 for (auto next = it; ++next != this->end(); ++it)
16480 {
16481 it->~value_type(); // Destroy but keep allocation
16482 new (&*it) value_type{ std::move(*next) };
16483 }
16484 Container::pop_back();
16485 return 1;
16486 }
16487 }
16488 return 0;
16489 }
16490
16491 iterator erase(iterator pos)
16492 {

Callers 15

tool_StripLeadingZeroFunction · 0.80
removeFromMethod · 0.80
LoadCustomMapFromPathMethod · 0.80
RemoveGoalMethod · 0.80
end_objectMethod · 0.80
eraseFunction · 0.80
patchFunction · 0.80
parseMethod · 0.80
Load_Sprite_FontMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected