When replacing packed_path1/2, also need to replace distance1/2 to properly track.

This commit is contained in:
Daniel Patterson 2015-05-28 10:51:24 -07:00 committed by Patrick Niklaus
parent e763953562
commit f52abc1a62

View File

@ -272,11 +272,13 @@ class ShortestPathRouting final
if (start_id_of_leg1 != last_id_of_packed_legs1) if (start_id_of_leg1 != last_id_of_packed_legs1)
{ {
packed_legs1 = packed_legs2; packed_legs1 = packed_legs2;
distance1 = distance2;
BOOST_ASSERT(start_id_of_leg1 == temporary_packed_leg1.front()); BOOST_ASSERT(start_id_of_leg1 == temporary_packed_leg1.front());
} }
else if (start_id_of_leg2 != last_id_of_packed_legs2) else if (start_id_of_leg2 != last_id_of_packed_legs2)
{ {
packed_legs2 = packed_legs1; packed_legs2 = packed_legs1;
distance2 = distance1;
BOOST_ASSERT(start_id_of_leg2 == temporary_packed_leg2.front()); BOOST_ASSERT(start_id_of_leg2 == temporary_packed_leg2.front());
} }
} }