Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DFHack/dfhack
/ alreadyDone
Method
alreadyDone
library/modules/Once.cpp:9–11 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
7
static unordered_set<string> thingsDone;
8
9
bool DFHack::Once::alreadyDone(string bob) {
10
return thingsDone.find(bob) != thingsDone.end();
11
}
12
13
bool DFHack::Once::doOnce(string bob) {
14
return thingsDone.insert(bob).second;
Callers
nothing calls this directly
Calls
2
find
Method · 0.45
end
Method · 0.45
Tested by
no test coverage detected