MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Clear

Method Clear

src/group_cmd.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 * Clear all caches.
32 */
33void GroupStatistics::Clear()
34{
35 this->num_vehicle = 0;
36 this->profit_last_year = 0;
37 this->num_vehicle_min_age = 0;
38 this->profit_last_year_min_age = 0;
39
40 /* This is also called when NewGRF change. So the number of engines might have changed. Reset. */
41 this->num_engines.clear();
42}
43
44/**
45 * Update children list for each group.

Callers 1

UpdateAfterLoadMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected