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

Method apply

plugins/manipulator.cpp:874–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872 cur_page = p;
873 }
874 void apply(void (*func)(UnitInfo*, string), string arg, StringFormatter<UnitInfo*> *arg_formatter)
875 {
876 if (dirty)
877 *dirty = true;
878 for (auto it = units.begin(); it != units.end(); ++it)
879 {
880 UnitInfo* u = (*it);
881 if (!u || !u->unit || !u->allowEdit) continue;
882 string cur_arg = arg_formatter->format(u, arg);
883 func(u, cur_arg);
884 }
885 }
886 void feed(set<df::interface_key> *events)
887 {
888 if (cur_page == MENU)

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected