From 14f8d8b32f28e4ff8e3deacfc7155ac67707de58 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 15:51:47 +0000 Subject: [PATCH] Decompile fn_19384 (CNaviData::CollectLinksTo) Batch #16249 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_19384 CNaviData::CollectLinksTo: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/NavigationRoute.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Contents/NavigationRoute.cpp b/Source/Contents/NavigationRoute.cpp index d5d3ca843..a9be026f8 100644 --- a/Source/Contents/NavigationRoute.cpp +++ b/Source/Contents/NavigationRoute.cpp @@ -1068,15 +1068,16 @@ int NaviDataEntry::GetCost() const { __declspec(noinline) bool CNaviData::CollectLinksTo(CNaviInfo* target, std::vector* out) { out->clear(); for (auto info = this->destinations.begin(); info != this->destinations.end(); ++info) { - for (auto link = (*info)->LinksBegin(); link != (*info)->LinksEnd(); ++link) { + std::vector::iterator link; + for (link = (*info)->LinksBegin(); link != (*info)->LinksEnd(); ++link) { if ((*link)->GetLinkedInfo() == target) { out->push_back(*link); } } } - for (auto link = this->objects.begin(); link != this->objects.end(); ++link) { - if ((*link)->GetLinkedInfo() == target) { - out->push_back(*link); + for (auto& link : this->objects) { + if (link->GetLinkedInfo() == target) { + out->push_back(link); } } return out->size() != 0;