1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 13:44:16 +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

@@ -4426,8 +4426,8 @@ uint MoveGoodsToStation(CargoType type, uint amount, Source source, const Statio
return UpdateStationWaiting(first_station, type, amount, source);
}
uint company_best[OWNER_NONE + 1] = {}; // best rating for each company, including OWNER_NONE
uint company_sum[OWNER_NONE + 1] = {}; // sum of ratings for each company
ReferenceThroughBaseContainer<std::array<uint32_t, OWNER_END>> company_best = {}; // best rating for each company, including OWNER_NONE
ReferenceThroughBaseContainer<std::array<uint32_t, OWNER_END>> company_sum = {}; // sum of ratings for each company
uint best_rating = 0;
uint best_sum = 0; // sum of best ratings for each company