summaryrefslogtreecommitdiff
path: root/src/animated_tile.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2018-09-24 20:18:16 +0100
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commit9b5cc73f3eeefdad439b2d93d872e621891f2b38 (patch)
tree48928883b69441238520568b4b0a2dcd40ac6019 /src/animated_tile.cpp
parent846095224044b39ddd3249b6ea072e486ba1fe38 (diff)
downloadopenttd-9b5cc73f3eeefdad439b2d93d872e621891f2b38.tar.xz
Codechange: Replaced SmallVector::ErasePreservingOrder(it, count) with std::vector::erase()
Diffstat (limited to 'src/animated_tile.cpp')
-rw-r--r--src/animated_tile.cpp6
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);
}
}