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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user