diff options
Diffstat (limited to 'routing/routing_session.cpp')
-rw-r--r-- | routing/routing_session.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp index affe26a4f0..eee15c3cb4 100644 --- a/routing/routing_session.cpp +++ b/routing/routing_session.cpp @@ -534,21 +534,15 @@ bool RoutingSession::HasRouteAltitude() const return HasRouteAltitudeImpl(); } -bool RoutingSession::GetRouteAltitudes(feature::TAltitudes & routeAltitudes) const +bool RoutingSession::GetRouteAltitudesAndDistancesM(vector<double> & routeSegDistanceM, + feature::TAltitudes & routeAltitudesM) const { threads::MutexGuard guard(m_routeSessionMutex); - if (!HasRouteAltitudeImpl()) + if (!m_route.IsValid() || !HasRouteAltitudeImpl()) return false; - routeAltitudes.assign(m_route.GetAltitudes().begin(), m_route.GetAltitudes().end()); - return true; -} -bool RoutingSession::GetSegDistanceM(vector<double> & routeSegDistanceM) const -{ - threads::MutexGuard guard(m_routeSessionMutex); - if (!m_route.IsValid()) - return false; routeSegDistanceM = m_route.GetSegDistanceM(); + routeAltitudesM.assign(m_route.GetAltitudes().cbegin(), m_route.GetAltitudes().cend()); return true; } |