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

Method clear

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

clears out the containers for unloading maps or disabling the plugin

Source from the content-addressed store, hash-verified

265
266// clears out the containers for unloading maps or disabling the plugin
267void ChannelGroups::clear() {
268 debug_map();
269 WARN(groups).print(" <- clearing groups\n");
270 jobs.clear();
271 group_blocks.clear();
272 free_spots.clear();
273 groups_map.clear();
274 for(size_t i = 0; i < groups.size(); ++i) {
275 groups[i].clear();
276 free_spots.emplace(i);
277 }
278}
279
280// erases map_pos from its group, and deletes mappings IFF the group is empty
281void ChannelGroups::remove(const df::coord &map_pos) {

Callers 5

ClearDataFunction · 0.45
LoadSettingsFunction · 0.45
channel_safelyFunction · 0.45
load_channel_jobsMethod · 0.45
addMethod · 0.45

Calls 2

printMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected