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

@@ -69,8 +69,7 @@ TileIndex GetOtherBridgeEnd(TileIndex tile)
*/
int GetBridgeHeight(TileIndex t)
{
int h;
Slope tileh = GetTileSlope(t, &h);
auto [tileh, h] = GetTileSlopeZ(t);
Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetTunnelBridgeDirection(t)));
/* one height level extra for the ramp */