From aaf465f7cad0d80056add548594d6ef6d0571388 Mon Sep 17 00:00:00 2001 From: kobayu858 <129580202+kobayu858@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:15:11 +0900 Subject: [PATCH] fix(object_merger): fix shadowVariable (#7941) fix:shadowVariable Signed-off-by: kobayu858 --- .../src/association/solver/successive_shortest_path.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perception/object_merger/src/association/solver/successive_shortest_path.cpp b/perception/object_merger/src/association/solver/successive_shortest_path.cpp index 782aa1ef4ac31..e384f12d60051 100644 --- a/perception/object_merger/src/association/solver/successive_shortest_path.cpp +++ b/perception/object_merger/src/association/solver/successive_shortest_path.cpp @@ -328,12 +328,12 @@ void SSP::maximizeLinearAssignment( #ifndef NDEBUG // Check if the potentials are feasible potentials - for (int v = 0; v < n_nodes; ++v) { - for (auto it_incident_edge = adjacency_list.at(v).cbegin(); - it_incident_edge != adjacency_list.at(v).cend(); ++it_incident_edge) { + for (int w = 0; w < n_nodes; ++w) { + for (auto it_incident_edge = adjacency_list.at(w).cbegin(); + it_incident_edge != adjacency_list.at(w).cend(); ++it_incident_edge) { if (it_incident_edge->capacity > 0) { double reduced_cost = - it_incident_edge->cost + potentials.at(v) - potentials.at(it_incident_edge->dst); + it_incident_edge->cost + potentials.at(w) - potentials.at(it_incident_edge->dst); assert(reduced_cost >= 0); } }