summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/animated_tile.cpp6
-rw-r--r--src/core/smallvec_type.hpp10
2 files changed, 3 insertions, 13 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);
}
}
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index 1c713470f..7d856ca9b 100644
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -149,16 +149,6 @@ public:
}
/**
- * Remove items from the vector while preserving the order of other items.
- * @param item First item to remove.
- * @param count Number of consecutive items to remove.
- */
- inline void ErasePreservingOrder(T *item, uint count = 1)
- {
- this->ErasePreservingOrder(item - this->Begin(), count);
- }
-
- /**
* Tests whether a item is present in the vector, and appends it to the end if not.
* The '!=' operator of T is used for comparison.
* @param item Item to test for