From 09fa39c5b59d88a076a244cf1623a53b0ffa1434 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 16 Dec 2019 19:28:46 +0100 Subject: Codechange: Replace linkgraph related FOR_ALL with range-based for loops --- src/date.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/date.cpp') diff --git a/src/date.cpp b/src/date.cpp index 74ad76d14..778688720 100644 --- a/src/date.cpp +++ b/src/date.cpp @@ -210,8 +210,7 @@ static void OnNewYear() _date -= days_this_year; FOR_ALL_VEHICLES(v) v->date_of_last_service -= days_this_year; - LinkGraph *lg; - FOR_ALL_LINK_GRAPHS(lg) lg->ShiftDates(-days_this_year); + for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year); /* Because the _date wraps here, and text-messages expire by game-days, we have to clean out * all of them if the date is set back, else those messages will hang for ever */ -- cgit v1.2.3-54-g00ecf