From a9f884e3505c8160b00e0a91cddab70c9916d792 Mon Sep 17 00:00:00 2001 From: Anton Makouski Date: Tue, 17 May 2022 16:29:57 +0300 Subject: [PATCH] More precise assert ReachedYourDestination can happen on roundabout. Signed-off-by: Anton Makouski --- routing/car_directions.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routing/car_directions.cpp b/routing/car_directions.cpp index a6faa65810..ec74406771 100644 --- a/routing/car_directions.cpp +++ b/routing/car_directions.cpp @@ -44,9 +44,10 @@ void FixupCarTurns(std::vector const & junctions, R for (size_t idx = 0; idx < turnsDir.size(); ) { TurnItem & t = turnsDir[idx]; - if (currentEnterRoundAbout && t.m_turn != CarDirection::StayOnRoundAbout && t.m_turn != CarDirection::LeaveRoundAbout) + if (currentEnterRoundAbout && t.m_turn != CarDirection::StayOnRoundAbout + && t.m_turn != CarDirection::LeaveRoundAbout && t.m_turn != CarDirection::ReachedYourDestination) { - ASSERT(false, ("Only StayOnRoundAbout or LeaveRoundAbout are expected after EnterRoundAbout.")); + ASSERT(false, ("Only StayOnRoundAbout, LeaveRoundAbout or ReachedYourDestination are expected after EnterRoundAbout.")); exitNum = 0; currentEnterRoundAbout = nullptr; }