1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 03:12:41 +01:00

Codefix: 'Declaration hides variable'

This commit is contained in:
Rubidium
2025-02-15 16:03:27 +01:00
committed by rubidium42
parent 443d7ece29
commit 2d30df8110
3 changed files with 3 additions and 5 deletions

View File

@@ -1773,8 +1773,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
i->type = type;
auto &industries = Industry::industries[type];
auto it = std::ranges::lower_bound(industries, i->index);
it = industries.emplace(it, i->index);
industries.emplace(std::ranges::lower_bound(industries, i->index), i->index);
for (size_t index = 0; index < std::size(indspec->produced_cargo); ++index) {
if (!IsValidCargoType(indspec->produced_cargo[index])) break;