Codechange: Replaced SmallVector::Find() non-const with std::find()

This commit is contained in:
Henry Wilson
2018-09-23 17:36:45 +01:00
committed by PeterN
parent f3938fdb83
commit 81315939b9
7 changed files with 12 additions and 20 deletions

View File

@@ -27,7 +27,7 @@ SmallVector<TileIndex, 256> _animated_tiles;
*/
void DeleteAnimatedTile(TileIndex tile)
{
TileIndex *to_remove = _animated_tiles.Find(tile);
TileIndex *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);