diff --git a/routing/cross_mwm_connector.hpp b/routing/cross_mwm_connector.hpp index c8e6d2034c..e46edc1791 100644 --- a/routing/cross_mwm_connector.hpp +++ b/routing/cross_mwm_connector.hpp @@ -151,7 +151,7 @@ public: auto const & transition = GetTransition(segment); CHECK_NOT_EQUAL(transition.m_enterIdx, connector::kFakeIndex, ()); auto const enterIdx = transition.m_enterIdx; - for (uint32_t exitIdx = 0; exitIdx < static_cast(m_exits.size()); ++exitIdx) + for (size_t exitIdx = 0; exitIdx < m_exits.size(); ++exitIdx) { auto const weight = GetWeight(enterIdx, exitIdx); AddEdge(m_exits[exitIdx], weight, edges); @@ -163,7 +163,7 @@ public: auto const & transition = GetTransition(segment); CHECK_NOT_EQUAL(transition.m_exitIdx, connector::kFakeIndex, ()); auto const exitIdx = transition.m_exitIdx; - for (uint32_t enterIdx = 0; enterIdx < static_cast(m_enters.size()); ++enterIdx) + for (size_t enterIdx = 0; enterIdx < m_enters.size(); ++enterIdx) { auto const weight = GetWeight(enterIdx, exitIdx); AddEdge(m_enters[enterIdx], weight, edges); diff --git a/routing/leaps_graph.cpp b/routing/leaps_graph.cpp index e054075893..b24b1bffe0 100644 --- a/routing/leaps_graph.cpp +++ b/routing/leaps_graph.cpp @@ -75,9 +75,8 @@ void LeapsGraph::GetEdgesListFromStart(Segment const & segment, bool isOutgoing, { // Connect start to all exits (|isEnter| == false). auto const & exits = m_starter.GetGraph().GetTransitions(mwmId, false /* isEnter */); - for (uint32_t exitId = 0; exitId < static_cast(exits.size()); ++exitId) + for (auto const & exit : exits) { - auto const & exit = exits[exitId]; auto const & exitFrontPoint = m_starter.GetPoint(exit, true /* front */); auto const weight = m_starter.GetGraph().CalcLeapWeight(m_startPoint, exitFrontPoint); @@ -94,9 +93,8 @@ void LeapsGraph::GetEdgesListToFinish(Segment const & segment, bool isOutgoing, { // Connect finish to all enters (|isEnter| == true). auto const & enters = m_starter.GetGraph().GetTransitions(mwmId, true /* isEnter */); - for (uint32_t enterId = 0; enterId < static_cast(enters.size()); ++enterId) + for (auto const & enter : enters) { - auto const & enter = enters[enterId]; auto const & enterFrontPoint = m_starter.GetPoint(enter, true /* front */); auto const weight = m_starter.GetGraph().CalcLeapWeight(enterFrontPoint, m_finishPoint);