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

@@ -29,8 +29,7 @@ static int GetSlopePixelZ_Void(TileIndex, uint x, uint y, bool)
{
/* This function may be called on tiles outside the map, don't assume
* that 'tile' is a valid tile index. See GetSlopePixelZOutsideMap. */
int z;
Slope tileh = GetTilePixelSlopeOutsideMap(x >> 4, y >> 4, &z);
auto [tileh, z] = GetTilePixelSlopeOutsideMap(x >> 4, y >> 4);
return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
}