Codechange: Use std::vector for NewGRF station tile sprite layouts.

This commit is contained in:
Peter Nelson
2021-05-01 20:28:23 +01:00
committed by PeterN
parent bd1a20f6ee
commit a3e49178d1
4 changed files with 26 additions and 27 deletions

View File

@@ -2844,8 +2844,8 @@ static void DrawTile_Station(TileInfo *ti)
}
/* Ensure the chosen tile layout is valid for this custom station */
if (statspec->renderdata != nullptr) {
layout = &statspec->renderdata[tile_layout < statspec->tiles ? tile_layout : (uint)GetRailStationAxis(ti->tile)];
if (!statspec->renderdata.empty()) {
layout = &statspec->renderdata[tile_layout < statspec->renderdata.size() ? tile_layout : (uint)GetRailStationAxis(ti->tile)];
if (!layout->NeedsPreprocessing()) {
t = layout;
layout = nullptr;