diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-05-01 18:07:47 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-05-02 17:15:27 +0100 |
commit | bd1a20f6eee6758f6a812af18fbe5b41b491b5c4 (patch) | |
tree | 02d7a3f6a4aebae631c323d0e6493116c060d678 /src/waypoint_cmd.cpp | |
parent | 1f159f79de7428cbaa6133ec9cf06ce559980ea6 (diff) | |
download | openttd-bd1a20f6eee6758f6a812af18fbe5b41b491b5c4.tar.xz |
Codechange: Use std::vector for NewGRF station platform layouts.
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 01cdbc16e..e8e9e6945 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -153,7 +153,7 @@ static CommandCost IsValidTileForWaypoint(TileIndex tile, Axis axis, StationID * return CommandCost(); } -extern void GetStationLayout(byte *layout, int numtracks, int plat_len, const StationSpec *statspec); +extern void GetStationLayout(byte *layout, uint numtracks, uint plat_len, const StationSpec *statspec); extern CommandCost FindJoiningWaypoint(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Waypoint **wp); extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, Axis axis); |