1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 01:42:38 +01:00

Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID

This commit is contained in:
Rubidium
2025-02-10 18:03:01 +01:00
committed by rubidium42
parent 1ffc950e22
commit 5401ab1f7b
13 changed files with 23 additions and 20 deletions

View File

@@ -407,8 +407,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyEconomy()
NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyStats()
{
/* Fetch the latest version of the stats. */
NetworkCompanyStats company_stats[MAX_COMPANIES];
NetworkPopulateCompanyStats(company_stats);
NetworkCompanyStatsArray company_stats = NetworkGetCompanyStats();
/* Go through all the companies. */
for (const Company *company : Company::Iterate()) {