diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index df8d3bd187..c8c87a51cc 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -787,7 +787,7 @@ static IntervalTimer _economy_companies_yearly({TimerGameEcono for (Company *c : Company::Iterate()) { /* Move expenses to previous years. */ std::rotate(std::rbegin(c->yearly_expenses), std::rbegin(c->yearly_expenses) + 1, std::rend(c->yearly_expenses)); - c->yearly_expenses[0] = {}; + c->yearly_expenses[0].fill(0); InvalidateWindowData(WC_FINANCES, c->index); } diff --git a/src/economy.cpp b/src/economy.cpp index 18af650990..6bcaaa37b8 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -204,7 +204,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) Owner owner = c->index; int score = 0; - _score_part[owner] = {}; + _score_part[owner].fill(0); /* Count vehicles */ { diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 76b6340ba0..2cb7291e47 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -3072,7 +3072,7 @@ static IntervalTimer _economy_industries_monthly({TimerGameEco void InitializeIndustries() { - Industry::industries = {}; + Industry::industries.fill({}); _industry_sound_tile = TileIndex{}; _industry_builder.Reset(); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 06103c8197..97e5b3a009 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -675,8 +675,8 @@ static void UpdateVehicleViewportHash(Vehicle *v, int x, int y, int old_x, int o void ResetVehicleHash() { for (Vehicle *v : Vehicle::Iterate()) { v->hash_tile_current = nullptr; } - _vehicle_viewport_hash = {}; - _vehicle_tile_hash = {}; + _vehicle_viewport_hash.fill(nullptr); + _vehicle_tile_hash.fill(nullptr); } void ResetVehicleColourMap()