From 24e7d00af54c51ff80c71e6468457bdb869aa98f Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Tue, 15 Dec 2015 21:27:03 +0100 Subject: [PATCH] Fix call to shortest_path from match plugin /cc @danpat --- routing_algorithms/shortest_path.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routing_algorithms/shortest_path.hpp b/routing_algorithms/shortest_path.hpp index a2646c500..601e39460 100644 --- a/routing_algorithms/shortest_path.hpp +++ b/routing_algorithms/shortest_path.hpp @@ -352,16 +352,15 @@ class ShortestPathRouting final BOOST_ASSERT(!search_from_forward_node || source_phantom.forward_node_id != SPECIAL_NODEID); BOOST_ASSERT(!search_from_reverse_node || source_phantom.reverse_node_id != SPECIAL_NODEID); - if (source_phantom.forward_node_id == target_phantom.forward_node_id && source_phantom.GetForwardWeightPlusOffset() > target_phantom.GetForwardWeightPlusOffset()) { - search_to_forward_node = false; + search_to_forward_node = search_from_reverse_node; } if (source_phantom.reverse_node_id == target_phantom.reverse_node_id && source_phantom.GetReverseWeightPlusOffset() > target_phantom.GetReverseWeightPlusOffset()) { - search_to_reverse_node = false; + search_to_reverse_node = search_from_forward_node; } BOOST_ASSERT(search_from_forward_node || search_from_reverse_node);