summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-17 11:20:52 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commitab711e6942757d775c08c31a6c32d488feba1dba (patch)
treed102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/train_cmd.cpp
parent297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff)
downloadopenttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 0d4df42f4..6ce113184 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -837,8 +837,7 @@ static void RestoreTrainBackup(TrainList &list)
Train *prev = NULL;
/* Iterate over the list and rebuild it. */
- for (Train **iter = list.Begin(); iter != list.End(); iter++) {
- Train *t = *iter;
+ for (Train *t : list) {
if (prev != NULL) {
prev->SetNext(t);
} else if (t->Previous() != NULL) {