From 8bfd171aad148c891ba5bfba443b16ee47ee298f Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 25 Sep 2020 11:20:17 +0300 Subject: [PATCH] [routing] Minor fixes. --- routing/routing_session.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp index 575149dc91..8818c85fba 100644 --- a/routing/routing_session.cpp +++ b/routing/routing_session.cpp @@ -290,7 +290,7 @@ SessionState RoutingSession::OnLocationPositionChanged(GpsInfo const & info) m_turnNotificationsMgr.SetSpeedMetersPerSecond(info.m_speedMpS); - auto const formerCurIter = m_route->GetCurrentIteratorTurn(); + auto const formerIter = m_route->GetCurrentIteratorTurn(); if (m_route->MoveIterator(info)) { m_moveAwayCounter = 0; @@ -320,8 +320,8 @@ SessionState RoutingSession::OnLocationPositionChanged(GpsInfo const & info) auto const curIter = m_route->GetCurrentIteratorTurn(); // If we are moving to the next segment after passing the turn // it means the turn is changed. So the |m_onNewTurn| should be called. - if (formerCurIter && curIter && IsNormalTurn(*formerCurIter) && - formerCurIter->m_index < curIter->m_index && m_onNewTurn) + if (formerIter && curIter && IsNormalTurn(*formerIter) && + formerIter->m_index < curIter->m_index && m_onNewTurn) { m_onNewTurn(); }