forked from organicmaps/organicmaps
Style improvements.
This commit is contained in:
parent
c96d94d180
commit
b82e23bea4
5 changed files with 13 additions and 10 deletions
|
@ -2190,6 +2190,13 @@ void Framework::SetRouterImpl(RouterType type)
|
|||
m_currentRouterType = type;
|
||||
}
|
||||
|
||||
void Framework::SetRouteBuildingListener(TRouteBuildingCallback const & buildingCallback,
|
||||
TRouteProgressCallback const & progressCallback)
|
||||
{
|
||||
m_routingCallback = buildingCallback;
|
||||
m_progressCallback = progressCallback;
|
||||
}
|
||||
|
||||
void Framework::RemoveRoute()
|
||||
{
|
||||
m_bmManager.UserMarksClear(UserMarkContainer::DEBUG_MARK);
|
||||
|
|
|
@ -565,11 +565,8 @@ public:
|
|||
typedef function<void(routing::IRouter::ResultCode, vector<storage::TIndex> const &,
|
||||
vector<storage::TIndex> const &)> TRouteBuildingCallback;
|
||||
typedef function<void(float)> TRouteProgressCallback;
|
||||
void SetRouteBuildingListener(TRouteBuildingCallback const & buildingCallback, TRouteProgressCallback const & progressCallback)
|
||||
{
|
||||
m_routingCallback = buildingCallback;
|
||||
m_progressCallback = progressCallback;
|
||||
}
|
||||
void SetRouteBuildingListener(TRouteBuildingCallback const & buildingCallback,
|
||||
TRouteProgressCallback const & progressCallback);
|
||||
void FollowRoute() { GetLocationState()->StartRouteFollow(); }
|
||||
void CloseRouting();
|
||||
void GetRouteFollowingInfo(location::FollowingInfo & info) { m_routingSession.GetRouteFollowingInfo(info); }
|
||||
|
|
|
@ -198,10 +198,9 @@ void AsyncRouter::CalculateRouteImpl(TReadyCallback const & readyCallback, TProg
|
|||
}
|
||||
|
||||
if (!absent.empty() && code == IRouter::NoError)
|
||||
{
|
||||
code = IRouter::NeedMoreMaps;
|
||||
}
|
||||
|
||||
elapsedSec = timer.ElapsedSeconds(); // routing time + absents fetch time
|
||||
LogCode(code, elapsedSec);
|
||||
SendStatistics(startPoint, startDirection, finalPoint, code, route, elapsedSec);
|
||||
// Call callback only if we have some new data.
|
||||
|
|
|
@ -582,7 +582,7 @@ OsrmRouter::ResultCode OsrmRouter::CalculateRoute(m2::PointD const & startPoint,
|
|||
|
||||
LOG(LINFO, ("Duration of the start/stop points lookup", timer.ElapsedNano()));
|
||||
timer.Reset();
|
||||
progressCallback(15.f);
|
||||
progressCallback(15.0f);
|
||||
|
||||
// 4. Find route.
|
||||
RawRoutingResult routingResult;
|
||||
|
|
|
@ -106,8 +106,8 @@ private:
|
|||
void operator()(Route & route, IRouter::ResultCode e);
|
||||
};
|
||||
|
||||
//TODO (ldragunov) Make consistent DoReady and DoProgress callbacks. Now Do ready runs
|
||||
// GUI proc inside caller function, and DoProgressCallback calls inside callback wrapper.
|
||||
//TODO (ldragunov) Make consistent DoReady and DoProgress callbacks. Now DoReady runs
|
||||
// GUI proc inside caller function, and DoProgressCallback calls it inside callback wrapper.
|
||||
struct DoProgressCallback
|
||||
{
|
||||
TProgressCallbackFn m_progressCallback;
|
||||
|
|
Loading…
Add table
Reference in a new issue