This commit is contained in:
Lev Dragunov 2015-05-21 15:44:10 +03:00 committed by Alex Zolotarev
parent 12896909b6
commit be8d6a10e3
3 changed files with 9 additions and 9 deletions

View file

@ -166,7 +166,7 @@ void CalculateCrossAdjacency(string const & mwmRoutingPath, routing::CrossRoutin
// Fill sources and targets with start node task for ingoing (true) and target node task
// (false) for outgoing nodes
for (auto i = in.first; i != in.second; ++i)
sources.emplace_back(FeatureGraphNode(i->m_nodeId, true));
sources.emplace_back(i->m_nodeId, true);
for (auto i = out.first; i != out.second; ++i)
targets.emplace_back(i->m_nodeId, false);

View file

@ -1,5 +1,5 @@
#include "routing/osrm_engine.hpp"
#include "routing/osrm2feature_map.hpp"
#include "osrm_engine.hpp"
#include "osrm2feature_map.hpp"
#include "base/logging.hpp"
#include "base/timer.hpp"
@ -36,9 +36,9 @@ void FindWeightsMatrix(const RoutingNodesT & sources, const RoutingNodesT & targ
NMManyToManyRouting<RawDataFacadeT> pathFinder(&facade, engineData);
PhantomNodeArray sourcesTaskVector(sources.size());
PhantomNodeArray targetsTaskVector(targets.size());
for (int i = 0; i < sources.size(); ++i)
for (size_t i = 0; i < sources.size(); ++i)
sourcesTaskVector[i].push_back(sources[i].m_node);
for (int i = 0; i < targets.size(); ++i)
for (size_t i = 0; i < targets.size(); ++i)
targetsTaskVector[i].push_back(targets[i].m_node);
// Calculate time consumption of a NtoM path finding.
@ -80,7 +80,7 @@ bool FindSingleRoute(const FeatureGraphNode & source, const FeatureGraphNode & t
data.reserve(path.size());
for (auto const & element : path)
{
data.emplace_back(RawPathData(element.node, element.segment_duration));
data.emplace_back(element.node, element.segment_duration);
}
rawRoutingResult.unpacked_path_segments.emplace_back(move(data));
}

View file

@ -547,7 +547,7 @@ public:
auto income_iterators = m_targetContext.GetIngoingIterators();
m_sources.reserve(distance(income_iterators.first, income_iterators.second));
for (auto i = income_iterators.first; i < income_iterators.second; ++i)
m_sources.emplace_back(FeatureGraphNode(i->m_nodeId, true));
m_sources.emplace_back(i->m_nodeId, true);
vector<EdgeWeight> weights;
for (FeatureGraphNode const & t : targetTask)
@ -743,7 +743,7 @@ OsrmRouter::ResultCode OsrmRouter::CalculateRoute(m2::PointD const & startPoint,
}
for (auto j = mwmOutsIter.first; j < mwmOutsIter.second; ++j)
targets.emplace_back(FeatureGraphNode(j->m_nodeId, false));
targets.emplace_back(j->m_nodeId, false);
vector<EdgeWeight> weights;
for (auto const & t : startTask)
{
@ -976,7 +976,7 @@ OsrmRouter::ResultCode OsrmRouter::MakeTurnAnnotation(RawRoutingResult const & r
#ifdef _DEBUG
size_t lastIdx = 0;
#endif
for (auto i : osrm::irange<size_t>(0, routingResult.unpacked_path_segments.size()))
for (size_t i = 0; i < routingResult.unpacked_path_segments.size(); ++i)
{
INTERRUPT_WHEN_CANCELLED();