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

Method emplace

Source/Utils/json.hpp:16423–16434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16421 : Container{ init, alloc } {}
16422
16423 std::pair<iterator, bool> emplace(const key_type& key, T&& t)
16424 {
16425 for (auto it = this->begin(); it != this->end(); ++it)
16426 {
16427 if (it->first == key)
16428 {
16429 return { it, false };
16430 }
16431 }
16432 Container::emplace_back(key, t);
16433 return { --this->end(), true };
16434 }
16435
16436 T& operator[](const Key& key)
16437 {

Callers 8

findCampaignsMethod · 0.80
findSavesMethod · 0.80
findCustomMapsMethod · 0.80
finalise_aliasesMethod · 0.80
add_one_optionMethod · 0.80
from_jsonFunction · 0.80
basic_jsonFunction · 0.80
emplaceFunction · 0.80

Calls 3

emplace_backFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected