Codechange: Replace linkgraph related FOR_ALL with range-based for loops

This commit is contained in:
glx
2019-12-16 19:28:46 +01:00
committed by Niels Martin Hansen
parent 00c2a98cf3
commit 09fa39c5b5
5 changed files with 8 additions and 19 deletions

View File

@@ -534,6 +534,4 @@ protected:
EdgeMatrix edges; ///< Edges in the component.
};
#define FOR_ALL_LINK_GRAPHS(var) FOR_ALL_ITEMS_FROM(LinkGraph, link_graph_index, var, 0)
#endif /* LINKGRAPH_H */

View File

@@ -334,8 +334,6 @@ public:
inline const LinkGraph &Graph() const { return this->link_graph; }
};
#define FOR_ALL_LINK_GRAPH_JOBS(var) FOR_ALL_ITEMS_FROM(LinkGraphJob, link_graph_job_index, var, 0)
/**
* A leg of a path in the link graph. Paths can form trees by being "forked".
*/

View File

@@ -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);
}
/**