Add wrapper class for diagonal or orthogonal tile iteration
This commit is contained in:
@@ -2411,8 +2411,8 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
CommandCost error = CommandCost(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK); // by default, there is no track to convert.
|
||||
bool found_convertible_track = false; // whether we actually did convert some track (see bug #7633)
|
||||
|
||||
std::unique_ptr<TileIterator> iter(diagonal ? (TileIterator *)new DiagonalTileIterator(area_start, area_end) : new OrthogonalTileIterator(area_start, area_end));
|
||||
for (; (tile = *iter) != INVALID_TILE; ++(*iter)) {
|
||||
OrthogonalOrDiagonalTileIterator iter(area_start, area_end, diagonal);
|
||||
for (; (tile = *iter) != INVALID_TILE; ++iter) {
|
||||
TileType tt = GetTileType(tile);
|
||||
|
||||
/* Check if there is any track on tile */
|
||||
|
Reference in New Issue
Block a user