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

Method ProcessUnits

plugins/autobutcher.cpp:346–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344 }
345
346 static int ProcessUnits(UnitsPQ& units, int limit) {
347 limit = std::max(limit, 0);
348 int count = 0;
349 while (units.size() > (size_t)limit) {
350 doMarkForSlaughter(units.top());
351 units.pop();
352 ++count;
353 }
354 return count;
355 }
356
357 int ProcessUnits() {
358 int slaughter_count = 0;

Callers 1

autobutcher_cycleFunction · 0.80

Calls 3

doMarkForSlaughterFunction · 0.85
topMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected