summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-15 17:10:46 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit60e3cf8aff9a7b98a0365ab734bebf70607160a1 (patch)
treedac5e2054f6666dff239e6c441bd238ced7bb8ca /src/saveload
parentddabfed1cd3efa9ee229214207a60fc7cb3e0641 (diff)
downloadopenttd-60e3cf8aff9a7b98a0365ab734bebf70607160a1.tar.xz
Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/autoreplace_sl.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp
index abfd32755..88f925cc5 100644
--- a/src/saveload/autoreplace_sl.cpp
+++ b/src/saveload/autoreplace_sl.cpp
@@ -26,9 +26,7 @@ static const SaveLoad _engine_renew_desc[] = {
static void Save_ERNW()
{
- EngineRenew *er;
-
- FOR_ALL_ENGINE_RENEWS(er) {
+ for (EngineRenew *er : EngineRenew::Iterate()) {
SlSetArrayIndex(er->index);
SlObject(er, _engine_renew_desc);
}
@@ -53,9 +51,7 @@ static void Load_ERNW()
static void Ptrs_ERNW()
{
- EngineRenew *er;
-
- FOR_ALL_ENGINE_RENEWS(er) {
+ for (EngineRenew *er : EngineRenew::Iterate()) {
SlObject(er, _engine_renew_desc);
}
}