Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.

This commit is contained in:
Michael Lutz
2023-01-03 13:48:42 +01:00
parent 4d3da0cf14
commit aab580e0ac
9 changed files with 94 additions and 409 deletions

View File

@@ -234,7 +234,7 @@ void AfterLoadLinkGraphs()
if (IsSavegameVersionBefore(SLV_191)) {
for (LinkGraph *lg : LinkGraph::Iterate()) {
for (NodeID node_id = 0; node_id < lg->Size(); ++node_id) {
const Station *st = Station::GetIfValid((*lg)[node_id].Station());
const Station *st = Station::GetIfValid((*lg)[node_id].station);
if (st != nullptr) (*lg)[node_id].UpdateLocation(st->xy);
}
}
@@ -242,7 +242,7 @@ void AfterLoadLinkGraphs()
for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) {
LinkGraph *lg = &(const_cast<LinkGraph &>(lgj->Graph()));
for (NodeID node_id = 0; node_id < lg->Size(); ++node_id) {
const Station *st = Station::GetIfValid((*lg)[node_id].Station());
const Station *st = Station::GetIfValid((*lg)[node_id].station);
if (st != nullptr) (*lg)[node_id].UpdateLocation(st->xy);
}
}