MCPcopy Create free account
hub / github.com/DFHack/dfhack / find

Method find

plugins/channel-safely/channel-groups.cpp:312–318  ·  view source on GitHub ↗

finds a group corresponding to a map position if one exists

Source from the content-addressed store, hash-verified

310
311// finds a group corresponding to a map position if one exists
312Groups::const_iterator ChannelGroups::find(const df::coord &map_pos) const {
313 const auto iter = groups_map.find(map_pos);
314 if (iter != groups_map.end()) {
315 return groups.begin() + iter->second;
316 }
317 return groups.end();
318}
319
320// returns an iterator to the first element stored
321Groups::const_iterator ChannelGroups::begin() const {

Callers 4

manage_groupMethod · 0.45
NewReportEventFunction · 0.45
addMethod · 0.45
removeMethod · 0.45

Calls 2

endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected