1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Codechange: Use .fill() to clear an array instead of assigning a new array. (#13880)

Avoids allocating a temporary on the stack.
This commit is contained in:
Peter Nelson
2025-03-23 22:09:45 +00:00
committed by GitHub
parent ca801d55d5
commit fc7b6c6cbb
4 changed files with 5 additions and 5 deletions

View File

@@ -3072,7 +3072,7 @@ static IntervalTimer<TimerGameEconomy> _economy_industries_monthly({TimerGameEco
void InitializeIndustries()
{
Industry::industries = {};
Industry::industries.fill({});
_industry_sound_tile = TileIndex{};
_industry_builder.Reset();