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

Function GetCurrentTotalNumberOfIndustries

src/industry_cmd.cpp:2415–2422  ·  view source on GitHub ↗

* Get total number of industries existing in the game. * @return Number of industries currently in the game. */

Source from the content-addressed store, hash-verified

2413 * @return Number of industries currently in the game.
2414 */
2415static uint GetCurrentTotalNumberOfIndustries()
2416{
2417 uint total = 0;
2418 for (const auto &industries : Industry::industries) {
2419 total += static_cast<uint16_t>(std::size(industries));
2420 }
2421 return total;
2422}
2423
2424
2425/** Reset the entry. */

Callers 3

ResetMethod · 0.85
EconomyMonthlyLoopMethod · 0.85
industry_cmd.cppFile · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected