summaryrefslogtreecommitdiff
path: root/src/linkgraph/linkgraphschedule.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-16 19:28:46 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit09fa39c5b59d88a076a244cf1623a53b0ffa1434 (patch)
treec4b7006085df37a7c0b5f5a5bb3e62bcc53cae42 /src/linkgraph/linkgraphschedule.cpp
parent00c2a98cf395d6e2a85290048e7be7a7f6ce0d04 (diff)
downloadopenttd-09fa39c5b59d88a076a244cf1623a53b0ffa1434.tar.xz
Codechange: Replace linkgraph related FOR_ALL with range-based for loops
Diffstat (limited to 'src/linkgraph/linkgraphschedule.cpp')
-rw-r--r--src/linkgraph/linkgraphschedule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp
index b1ee71f9a..964744509 100644
--- a/src/linkgraph/linkgraphschedule.cpp
+++ b/src/linkgraph/linkgraphschedule.cpp
@@ -107,10 +107,8 @@ void LinkGraphSchedule::SpawnAll()
*/
void LinkGraphSchedule::ShiftDates(int interval)
{
- LinkGraph *lg;
- FOR_ALL_LINK_GRAPHS(lg) lg->ShiftDates(interval);
- LinkGraphJob *lgj;
- FOR_ALL_LINK_GRAPH_JOBS(lgj) lgj->ShiftJoinDate(interval);
+ for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(interval);
+ for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) lgj->ShiftJoinDate(interval);
}
/**