forked from organicmaps/organicmaps
Corrections after colleagues comments.
This commit is contained in:
parent
0898c0ef8a
commit
8521a8e313
3 changed files with 8 additions and 8 deletions
|
@ -365,7 +365,7 @@ bool OsrmFtSegBackwardIndex::Load(string const & nodesFileName, string const & b
|
|||
return true;
|
||||
}
|
||||
|
||||
void OsrmFtSegBackwardIndex::Construct(OsrmFtSegMapping & mapping, const uint32_t maxNodeId,
|
||||
void OsrmFtSegBackwardIndex::Construct(OsrmFtSegMapping & mapping, uint32_t maxNodeId,
|
||||
FilesMappingContainer & routingFile)
|
||||
{
|
||||
Clear();
|
||||
|
|
|
@ -109,7 +109,7 @@ class OsrmFtSegBackwardIndex
|
|||
bool Load(string const & nodesFileName, string const & bitsFileName);
|
||||
|
||||
public:
|
||||
void Construct(OsrmFtSegMapping & mapping, uint32_t const maxNodeId,
|
||||
void Construct(OsrmFtSegMapping & mapping, uint32_t maxNodeId,
|
||||
FilesMappingContainer & routingFile);
|
||||
|
||||
TNodesList const & GetNodeIdByFid(uint32_t fid) const;
|
||||
|
|
|
@ -111,7 +111,8 @@ public:
|
|||
static CarModel const carModel;
|
||||
if (ft.GetFeatureType() != feature::GEOM_LINE || !carModel.IsRoad(ft))
|
||||
return;
|
||||
for (auto const n : m_routingMapping.m_segMapping.GetNodeIdByFid(ft.GetID().m_offset))
|
||||
uint32_t const offset = ft.GetID().m_offset;
|
||||
for (auto const n : m_routingMapping.m_segMapping.GetNodeIdByFid(offset))
|
||||
n_nodeIds.push_back(n);
|
||||
}
|
||||
|
||||
|
@ -192,8 +193,8 @@ bool KeepTurnByHighwayClass(TurnDirection turn, TTurnCandidates const & possible
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RemoveTurnByIngoingAndOutgoingEdges(TurnDirection intermediateDirection, TurnInfo const & turnInfo,
|
||||
TurnItem const & turn)
|
||||
bool DiscardTurnByIngoingAndOutgoingEdges(TurnDirection intermediateDirection, TurnInfo const & turnInfo,
|
||||
TurnItem const & turn)
|
||||
{
|
||||
return !turn.m_keepAnyway && !turnInfo.m_isIngoingEdgeRoundabout && !turnInfo.m_isOutgoingEdgeRoundabout
|
||||
&& IsGoStraightOrSlightTurn(intermediateDirection)
|
||||
|
@ -375,8 +376,7 @@ void GetPossibleTurns(Index const & index, NodeID node, m2::PointD const & ingoi
|
|||
scales::GetUpperScale(), routingMapping.GetMwmId());
|
||||
|
||||
sort(geomNodes.begin(), geomNodes.end());
|
||||
auto it = unique(geomNodes.begin(), geomNodes.end());
|
||||
geomNodes.erase(it, geomNodes.end());
|
||||
geomNodes.erase(unique(geomNodes.begin(), geomNodes.end()), geomNodes.end());
|
||||
|
||||
// Filtering virtual edges.
|
||||
vector<NodeID> adjacentNodes;
|
||||
|
@ -768,7 +768,7 @@ void GetTurnDirection(Index const & index, TurnInfo & turnInfo, TurnItem & turn)
|
|||
|
||||
turn.m_turn = TurnDirection::NoTurn;
|
||||
// Early filtering based only on the information about ingoing and outgoing edges.
|
||||
if (RemoveTurnByIngoingAndOutgoingEdges(intermediateDirection, turnInfo, turn))
|
||||
if (DiscardTurnByIngoingAndOutgoingEdges(intermediateDirection, turnInfo, turn))
|
||||
return;
|
||||
|
||||
m2::PointD const ingoingPointOneSegment =
|
||||
|
|
Loading…
Add table
Reference in a new issue