diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-05-01 20:28:23 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-05-02 17:15:27 +0100 |
commit | a3e49178d1d5d65e3ce91328d743d1642f324961 (patch) | |
tree | 26305a3efe359650389fc620bedf58ef1b752a24 /src/newgrf_station.cpp | |
parent | bd1a20f6eee6758f6a812af18fbe5b41b491b5c4 (diff) | |
download | openttd-a3e49178d1d5d65e3ce91328d743d1642f324961.tar.xz |
Codechange: Use std::vector for NewGRF station tile sprite layouts.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 9aa3ad43b..eff5ef2b2 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -798,10 +798,10 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID const NewGRFSpriteLayout *layout = nullptr; DrawTileSprites tmp_rail_layout; - if (statspec->renderdata == nullptr) { + if (statspec->renderdata.empty()) { sprites = GetStationTileLayout(STATION_RAIL, tile + axis); } else { - layout = &statspec->renderdata[(tile < statspec->tiles) ? tile + axis : (uint)axis]; + layout = &statspec->renderdata[(tile < statspec->renderdata.size()) ? tile + axis : (uint)axis]; if (!layout->NeedsPreprocessing()) { sprites = layout; layout = nullptr; |