forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
6e03fc729f
commit
e430ffb8c3
2 changed files with 10 additions and 9 deletions
|
@ -476,7 +476,7 @@ void Route::GetSubrouteInfo(size_t segmentIdx, std::vector<SegmentInfo> & segmen
|
|||
CHECK(IsValid(), ());
|
||||
segments.clear();
|
||||
|
||||
vector<m2::PointD> const & points = m_poly.GetPolyline().GetPoints();
|
||||
auto const & points = m_poly.GetPolyline().GetPoints();
|
||||
size_t const polySz = m_poly.GetPolyline().GetSize();
|
||||
|
||||
CHECK(!m_turns.empty(), ());
|
||||
|
@ -547,15 +547,15 @@ void Route::SetSubrouteUid(size_t segmentIdx, SubrouteUid subrouteUid)
|
|||
m_subrouteUid = subrouteUid;
|
||||
}
|
||||
|
||||
Junction Route::GetJunction(size_t pointInx) const
|
||||
Junction Route::GetJunction(size_t pointIdx) const
|
||||
{
|
||||
CHECK(IsValid(), ());
|
||||
if (!m_altitudes.empty())
|
||||
CHECK_EQUAL(m_altitudes.size(), m_poly.GetPolyline().GetSize(), ());
|
||||
|
||||
vector<m2::PointD> const & points = m_poly.GetPolyline().GetPoints();
|
||||
return Junction(points[pointInx],
|
||||
m_altitudes.empty() ? feature::kInvalidAltitude : m_altitudes[pointInx]);
|
||||
auto const & points = m_poly.GetPolyline().GetPoints();
|
||||
return Junction(points[pointIdx],
|
||||
m_altitudes.empty() ? feature::kInvalidAltitude : m_altitudes[pointIdx]);
|
||||
}
|
||||
|
||||
string DebugPrint(Route const & r)
|
||||
|
|
|
@ -75,15 +75,16 @@ public:
|
|||
traffic::SpeedGroup const m_traffic = traffic::SpeedGroup::Unknown;
|
||||
};
|
||||
|
||||
struct SubrouteAttrs
|
||||
class SubrouteAttrs final
|
||||
{
|
||||
public:
|
||||
SubrouteAttrs(Junction const & start, Junction const & finish)
|
||||
: m_start(start), m_finish(finish)
|
||||
{
|
||||
}
|
||||
|
||||
Junction GetStart() const { return m_start; }
|
||||
Junction GetFinish() const { return m_finish; }
|
||||
Junction const & GetStart() const { return m_start; }
|
||||
Junction const & GetFinish() const { return m_finish; }
|
||||
|
||||
private:
|
||||
Junction m_start;
|
||||
|
@ -243,7 +244,7 @@ private:
|
|||
TStreets::const_iterator GetCurrentStreetNameIterAfter(FollowedPolyline::Iter iter) const;
|
||||
void AppendTraffic(Route const & route);
|
||||
|
||||
Junction GetJunction(size_t pointInx) const;
|
||||
Junction GetJunction(size_t pointIdx) const;
|
||||
|
||||
string m_router;
|
||||
RoutingSettings m_routingSettings;
|
||||
|
|
Loading…
Add table
Reference in a new issue