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

Function increment_counter

plugins/timestream.cpp:414–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413template <typename FT, typename T>
414static void increment_counter(T *obj, FT T::*field, int32_t timeskip) {
415 if (obj->*field <= 0)
416 return;
417 obj->*field = obj->*field + timeskip;
418}
419
420template <typename FT, typename T>
421static void decrement_counter(T *obj, FT T::*field, int32_t timeskip) {

Callers 4

adjust_unit_countersFunction · 0.85
adjust_activitiesFunction · 0.85
adjust_buildingsFunction · 0.85
adjust_itemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected