Review fixes.

This commit is contained in:
Vladimir Byko-Ianko 2016-05-26 14:28:46 +03:00
parent 9d393d2b51
commit 5656ce5c23
2 changed files with 9 additions and 13 deletions

View file

@ -64,11 +64,7 @@ vector<Edge>::const_iterator FindEdgeContainingPoint(vector<Edge> const & edges,
/// \brief Reverses |edges| starting from index |beginIdx| and upto the end of |v|.
void ReverseEdges(size_t beginIdx, IRoadGraph::TEdgeVector & edges)
{
if (beginIdx > edges.size())
{
ASSERT(false, ());
return;
}
ASSERT_LESS_OR_EQUAL(beginIdx, edges.size(), ("Index too large."));
for (size_t i = beginIdx; i < edges.size(); ++i)
edges[i] = edges[i].GetReverseEdge();
@ -167,8 +163,8 @@ IRoadGraph::RoadInfo::RoadInfo(bool bidirectional, double speedKMPH, initializer
{}
// IRoadGraph::CrossOutgoingLoader ---------------------------------------------
void IRoadGraph::CrossOutgoingLoader::LoadEdge(FeatureID const & featureId,
RoadInfo const & roadInfo)
void IRoadGraph::CrossOutgoingLoader::LoadEdges(FeatureID const & featureId,
RoadInfo const & roadInfo)
{
size_t const numPoints = roadInfo.m_points.size();
@ -198,8 +194,8 @@ void IRoadGraph::CrossOutgoingLoader::LoadEdge(FeatureID const & featureId,
}
// IRoadGraph::CrossIngoingLoader ----------------------------------------------
void IRoadGraph::CrossIngoingLoader::LoadEdge(FeatureID const & featureId,
RoadInfo const & roadInfo)
void IRoadGraph::CrossIngoingLoader::LoadEdges(FeatureID const & featureId,
RoadInfo const & roadInfo)
{
size_t const numPoints = roadInfo.m_points.size();

View file

@ -116,11 +116,11 @@ public:
void operator()(FeatureID const & featureId, RoadInfo const & roadInfo)
{
LoadEdge(featureId, roadInfo);
LoadEdges(featureId, roadInfo);
}
private:
virtual void LoadEdge(FeatureID const & featureId, RoadInfo const & roadInfo) = 0;
virtual void LoadEdges(FeatureID const & featureId, RoadInfo const & roadInfo) = 0;
protected:
m2::PointD const m_cross;
@ -137,7 +137,7 @@ public:
}
// ICrossEdgesLoader overrides:
virtual void LoadEdge(FeatureID const & featureId, RoadInfo const & roadInfo) override;
virtual void LoadEdges(FeatureID const & featureId, RoadInfo const & roadInfo) override;
};
class CrossIngoingLoader : public ICrossEdgesLoader
@ -148,7 +148,7 @@ public:
{
}
// ICrossEdgesLoader overrides:
virtual void LoadEdge(FeatureID const & featureId, RoadInfo const & roadInfo) override;
virtual void LoadEdges(FeatureID const & featureId, RoadInfo const & roadInfo) override;
};
virtual ~IRoadGraph() = default;