MCPcopy Create free account
hub / github.com/BanjoRecomp/BanjoRecomp / erase_first

Method erase_first

src/game/recomp_data_api.cpp:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 }
46
47 bool erase_first(ValueType& out) {
48 std::lock_guard lock{mutex};
49 auto it = map.begin();
50
51 if (it == map.end()) {
52 return false;
53 }
54
55 out = it->second;
56 map.erase(it);
57 return true;
58 }
59
60 bool contains(const KeyType& key) {
61 std::lock_guard lock{mutex};

Calls 3

beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected