diff options
author | glx <glx@openttd.org> | 2019-12-15 17:10:46 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | 60e3cf8aff9a7b98a0365ab734bebf70607160a1 (patch) | |
tree | dac5e2054f6666dff239e6c441bd238ced7bb8ca /src/saveload | |
parent | ddabfed1cd3efa9ee229214207a60fc7cb3e0641 (diff) | |
download | openttd-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.cpp | 8 |
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); } } |