diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-08-07 17:51:43 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:00 +0300 |
commit | 9d992a0641db2d6a9a6ed29b7265933fd94d57ae (patch) | |
tree | 3c2d4e126ccc8db11696cde099ab771a2be9e070 /map/framework.cpp | |
parent | 274174fed60a75cd57efd526c2eb09d74aa0f86e (diff) |
Added thread checker macro and its usage
Diffstat (limited to 'map/framework.cpp')
-rw-r--r-- | map/framework.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 707f884189..caedf287ef 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2120,6 +2120,8 @@ void Framework::UpdateSavedDataVersion() void Framework::BuildRoute(m2::PointD const & destination, uint32_t timeoutSec) { + ASSERT_THREAD_CHECKER(m_threadChecker, ("BuildRoute")); + shared_ptr<State> const & state = GetLocationState(); if (!state->IsModeHasPosition()) { @@ -2135,6 +2137,8 @@ void Framework::BuildRoute(m2::PointD const & destination, uint32_t timeoutSec) auto readyCallback = [this](Route const & route, IRouter::ResultCode code) { + ASSERT_THREAD_CHECKER(m_threadChecker, ("BuildRoute_ReadyCallback")); + vector<storage::TIndex> absentCountries; vector<storage::TIndex> absentRoutingIndexes; if (code == IRouter::NoError) @@ -2170,6 +2174,8 @@ void Framework::BuildRoute(m2::PointD const & destination, uint32_t timeoutSec) void Framework::SetRouter(RouterType type) { + ASSERT_THREAD_CHECKER(m_threadChecker, ("SetRouter")); + if (m_currentRouterType == type) return; SetRouterImpl(type); @@ -2213,6 +2219,8 @@ void Framework::SetRouterImpl(RouterType type) void Framework::RemoveRoute() { + ASSERT_THREAD_CHECKER(m_threadChecker, ("RemoveRoute")); + m_bmManager.UserMarksClear(UserMarkContainer::DEBUG_MARK); m_bmManager.ResetRouteTrack(); @@ -2220,6 +2228,8 @@ void Framework::RemoveRoute() void Framework::CloseRouting() { + ASSERT_THREAD_CHECKER(m_threadChecker, ("CloseRouting")); + GetLocationState()->StopRoutingMode(); m_routingSession.Reset(); RemoveRoute(); @@ -2228,6 +2238,8 @@ void Framework::CloseRouting() void Framework::InsertRoute(Route const & route) { + ASSERT_THREAD_CHECKER(m_threadChecker, ("InsertRoute")); + if (route.GetPoly().GetSize() < 2) { LOG(LWARNING, ("Invalid track - only", route.GetPoly().GetSize(), "point(s).")); |