forked from organicmaps/organicmaps
PR fixes.
This commit is contained in:
parent
33738fe7f6
commit
9cd1b67fa4
4 changed files with 6 additions and 8 deletions
|
@ -257,7 +257,7 @@ bool Platform::GetFileSizeByName(string const & fileName, uint64_t & size) const
|
|||
|
||||
Platform::EError Platform::MkDir(string const & dirName) const
|
||||
{
|
||||
if (mkdir(dirName.c_str(), 0755))
|
||||
if (0 != mkdir(dirName.c_str(), 0755))
|
||||
return ErrnoToError();
|
||||
return Platform::ERR_OK;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ void AsyncRouter::LogCode(IRouter::ResultCode code, double const elapsedSec)
|
|||
}
|
||||
}
|
||||
|
||||
// TODO (ldragunov) write some tests to check this callback logick.
|
||||
// TODO (ldragunov) write some tests to check this callback logic.
|
||||
void AsyncRouter::CalculateRouteImpl(TReadyCallback const & callback)
|
||||
{
|
||||
ASSERT(m_router, ());
|
||||
|
@ -170,7 +170,6 @@ void AsyncRouter::CalculateRouteImpl(TReadyCallback const & callback)
|
|||
code = m_router->CalculateRoute(startPoint, startDirection, finalPoint, route);
|
||||
|
||||
elapsedSec = timer.ElapsedSeconds(); // routing time
|
||||
LOG(LINFO, ("Router return code:"));
|
||||
LogCode(code, elapsedSec);
|
||||
}
|
||||
catch (RootException const & e)
|
||||
|
@ -208,7 +207,6 @@ void AsyncRouter::CalculateRouteImpl(TReadyCallback const & callback)
|
|||
}
|
||||
}
|
||||
|
||||
LOG(LINFO, ("Final code:"));
|
||||
LogCode(code, elapsedSec);
|
||||
SendStatistics(startPoint, startDirection, finalPoint, code, route, elapsedSec);
|
||||
// Call callback only if we have some new data.
|
||||
|
|
|
@ -343,7 +343,7 @@ string OsrmRouter::GetName() const
|
|||
void OsrmRouter::ClearState()
|
||||
{
|
||||
m_cachedTargets.clear();
|
||||
m_CachedTargetPoint = m2::PointD::Zero();
|
||||
m_cachedTargetPoint = m2::PointD::Zero();
|
||||
m_indexManager.Clear();
|
||||
}
|
||||
|
||||
|
@ -564,14 +564,14 @@ OsrmRouter::ResultCode OsrmRouter::CalculateRoute(m2::PointD const & startPoint,
|
|||
return code;
|
||||
}
|
||||
{
|
||||
if (finalPoint != m_CachedTargetPoint)
|
||||
if (finalPoint != m_cachedTargetPoint)
|
||||
{
|
||||
ResultCode const code =
|
||||
FindPhantomNodes(finalPoint, m2::PointD::Zero(),
|
||||
m_cachedTargets, kMaxNodeCandidatesCount, targetMapping);
|
||||
if (code != NoError)
|
||||
return code;
|
||||
m_CachedTargetPoint = finalPoint;
|
||||
m_cachedTargetPoint = finalPoint;
|
||||
}
|
||||
}
|
||||
INTERRUPT_WHEN_CANCELLED();
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
Index const * m_pIndex;
|
||||
|
||||
TFeatureGraphNodeVec m_cachedTargets;
|
||||
m2::PointD m_CachedTargetPoint;
|
||||
m2::PointD m_cachedTargetPoint;
|
||||
|
||||
RoutingIndexManager m_indexManager;
|
||||
TRoutingVisualizerFn m_routingVisualization;
|
||||
|
|
Loading…
Add table
Reference in a new issue