Codechange: Use std::tuple for slope functions with two return values

This commit is contained in:
Michael Lutz
2024-03-08 12:12:41 +01:00
parent 5806c2aba4
commit 8dda387f82
21 changed files with 79 additions and 113 deletions

View File

@@ -1003,7 +1003,7 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
}
}
Slope cur_slope = _settings_game.construction.build_on_slopes ? GetFoundationSlope(tile) : GetTileSlope(tile);
Slope cur_slope = _settings_game.construction.build_on_slopes ? std::get<0>(GetFoundationSlope(tile)) : GetTileSlope(tile);
bool ret = !IsNeighborRoadTile(tile, dir, t->layout == TL_ORIGINAL ? 1 : 2);
if (cur_slope == SLOPE_FLAT) return ret;