diff options
Diffstat (limited to 'src/animated_tile.cpp')
-rw-r--r-- | src/animated_tile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/animated_tile.cpp b/src/animated_tile.cpp index 3341f5795..eb10b9b8d 100644 --- a/src/animated_tile.cpp +++ b/src/animated_tile.cpp @@ -27,10 +27,10 @@ SmallVector<TileIndex, 256> _animated_tiles; */ void DeleteAnimatedTile(TileIndex tile) { - TileIndex *to_remove = &*std::find(_animated_tiles.begin(), _animated_tiles.end(), tile); - if (to_remove != _animated_tiles.End()) { + auto to_remove = std::find(_animated_tiles.begin(), _animated_tiles.end(), tile); + if (to_remove != _animated_tiles.end()) { /* The order of the remaining elements must stay the same, otherwise the animation loop may miss a tile. */ - _animated_tiles.ErasePreservingOrder(to_remove); + _animated_tiles.erase(to_remove); MarkTileDirtyByTile(tile); } } |