1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Codechange: Use member initializer list.

This commit is contained in:
2024-10-14 19:23:10 +01:00
committed by Peter Nelson
parent ea6aa4653a
commit 009e57ee03

View File

@@ -31,21 +31,9 @@ protected:
TileType tile_type;
RailType rail_type;
TILE()
{
tile = INVALID_TILE;
td = INVALID_TRACKDIR;
tile_type = MP_VOID;
rail_type = INVALID_RAILTYPE;
}
TILE() : tile(INVALID_TILE), td(INVALID_TRACKDIR), tile_type(MP_VOID), rail_type(INVALID_RAILTYPE) { }
TILE(TileIndex tile, Trackdir td)
{
this->tile = tile;
this->td = td;
this->tile_type = GetTileType(tile);
this->rail_type = GetTileRailType(tile);
}
TILE(TileIndex tile, Trackdir td) : tile(tile), td(td), tile_type(GetTileType(tile)), rail_type(GetTileRailType(tile)) { }
};
protected: