1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-28 14:44:28 +01:00

Codechange: Use TypedIndexContainer for typed index containers

Instead of ReferenceThroughBaseContainer
This commit is contained in:
Jonathan G Rennison
2025-06-08 20:46:58 +01:00
committed by Peter Nelson
parent d0e49a297f
commit 63f1c2aa3a
17 changed files with 23 additions and 23 deletions

View File

@@ -4431,8 +4431,8 @@ uint MoveGoodsToStation(CargoType cargo, uint amount, Source source, const Stati
return UpdateStationWaiting(first_station, cargo, amount, source);
}
ReferenceThroughBaseContainer<std::array<uint32_t, OWNER_END.base()>> company_best = {}; // best rating for each company, including OWNER_NONE
ReferenceThroughBaseContainer<std::array<uint32_t, OWNER_END.base()>> company_sum = {}; // sum of ratings for each company
TypedIndexContainer<std::array<uint32_t, OWNER_END.base()>, Owner> company_best = {}; // best rating for each company, including OWNER_NONE
TypedIndexContainer<std::array<uint32_t, OWNER_END.base()>, Owner> company_sum = {}; // sum of ratings for each company
uint best_rating = 0;
uint best_sum = 0; // sum of best ratings for each company