Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'routing/routing_session.cpp')
-rw-r--r--routing/routing_session.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp
index d1ace09a41..f5806c57e2 100644
--- a/routing/routing_session.cpp
+++ b/routing/routing_session.cpp
@@ -528,7 +528,8 @@ void RoutingSession::SetRoutingSettings(RoutingSettings const & routingSettings)
m_routingSettings = routingSettings;
}
-void RoutingSession::SetReadyCallbacks(TReadyCallback const & buildReadyCallback, TReadyCallback const & rebuildReadyCallback)
+void RoutingSession::SetReadyCallbacks(TReadyCallback const & buildReadyCallback,
+ TReadyCallback const & rebuildReadyCallback)
{
m_buildReadyCallback = buildReadyCallback;
// m_rebuildReadyCallback used from multiple threads but it's the only place we write m_rebuildReadyCallback
@@ -619,6 +620,13 @@ double RoutingSession::GetDistanceToCurrentCamM(SpeedCameraRestriction & camera,
return kInvalidSpeedCameraDistance;
}
+void RoutingSession::ProtectedCall(RouteCallback const & callback) const
+{
+ threads::MutexGuard guard(m_routingSessionMutex);
+ CHECK(m_route, ());
+ callback(*m_route);
+}
+
void RoutingSession::EmitCloseRoutingEvent() const
{
threads::MutexGuard guard(m_routingSessionMutex);
@@ -663,13 +671,6 @@ bool RoutingSession::GetRouteAltitudesAndDistancesM(vector<double> & routeSegDis
return true;
}
-shared_ptr<Route> const RoutingSession::GetRoute() const
-{
- threads::MutexGuard guard(m_routingSessionMutex);
- ASSERT(m_route, ());
- return m_route;
-}
-
void RoutingSession::OnTrafficInfoClear()
{
{