diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2019-03-25 18:49:04 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2019-03-26 13:00:04 +0300 |
commit | 2bceb4e7b26dec9aeb5ff63b958b99a9eabb9563 (patch) | |
tree | dfa432e83a1c7e79205374bc24740ddc61468f1a /routing | |
parent | 0912b4d1a74bdb73dacc9d04bb0e5edb4b0a7851 (diff) |
[routing] make some methods non-pure virtual
Diffstat (limited to 'routing')
-rw-r--r-- | routing/transit_world_graph.cpp | 7 | ||||
-rw-r--r-- | routing/transit_world_graph.hpp | 3 | ||||
-rw-r--r-- | routing/world_graph.cpp | 11 | ||||
-rw-r--r-- | routing/world_graph.hpp | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/routing/transit_world_graph.cpp b/routing/transit_world_graph.cpp index 22eaa18cf7..de5577e070 100644 --- a/routing/transit_world_graph.cpp +++ b/routing/transit_world_graph.cpp @@ -164,11 +164,6 @@ double TransitWorldGraph::CalcSegmentETA(routing::Segment const & segment) return m_estimator->CalcSegmentETA(segment, GetRealRoadGeometry(segment.GetMwmId(), segment.GetFeatureId())); } -vector<Segment> const & TransitWorldGraph::GetTransitions(NumMwmId numMwmId, bool isEnter) -{ - return kEmptyTransitions; -} - unique_ptr<TransitInfo> TransitWorldGraph::GetTransitInfo(Segment const & segment) { if (!TransitGraph::IsTransitSegment(segment)) @@ -185,8 +180,6 @@ unique_ptr<TransitInfo> TransitWorldGraph::GetTransitInfo(Segment const & segmen return {}; } -std::vector<RouteSegment::SpeedCamera> TransitWorldGraph::GetSpeedCamInfo(Segment const & segment) { return {}; } - void TransitWorldGraph::GetTwinsInner(Segment const & segment, bool isOutgoing, vector<Segment> & twins) { diff --git a/routing/transit_world_graph.hpp b/routing/transit_world_graph.hpp index d3105aff96..97860b8e71 100644 --- a/routing/transit_world_graph.hpp +++ b/routing/transit_world_graph.hpp @@ -59,9 +59,7 @@ public: RouteWeight CalcLeapWeight(m2::PointD const & from, m2::PointD const & to) const override; RouteWeight CalcOffroadWeight(m2::PointD const & from, m2::PointD const & to) const override; double CalcSegmentETA(Segment const & segment) override; - std::vector<Segment> const & GetTransitions(NumMwmId numMwmId, bool isEnter) override; std::unique_ptr<TransitInfo> GetTransitInfo(Segment const & segment) override; - std::vector<RouteSegment::SpeedCamera> GetSpeedCamInfo(Segment const & segment) override; void GetEdgeList(Segment const & segment, bool isOutgoing, std::vector<JointEdge> & edges, @@ -92,6 +90,5 @@ private: std::unique_ptr<TransitGraphLoader> m_transitLoader; std::shared_ptr<EdgeEstimator> m_estimator; WorldGraphMode m_mode = WorldGraphMode::NoLeaps; - std::vector<Segment> const kEmptyTransitions = {}; }; } // namespace routing diff --git a/routing/world_graph.cpp b/routing/world_graph.cpp index d0b3d5c60b..3c26ad05b1 100644 --- a/routing/world_graph.cpp +++ b/routing/world_graph.cpp @@ -46,8 +46,19 @@ bool WorldGraph::IsRoutingOptionsGood(Segment const & /* segment */) return true; } +std::vector<RouteSegment::SpeedCamera> WorldGraph::GetSpeedCamInfo(Segment const & segment) +{ + return {}; +} + void WorldGraph::SetRoutingOptions(RoutingOptions /* routingOption */) {} +std::vector<Segment> const & WorldGraph::GetTransitions(NumMwmId numMwmId, bool isEnter) +{ + static std::vector<Segment> const kEmpty; + return kEmpty; +} + std::string DebugPrint(WorldGraphMode mode) { switch (mode) diff --git a/routing/world_graph.hpp b/routing/world_graph.hpp index cec7ca985d..72090fbe2d 100644 --- a/routing/world_graph.hpp +++ b/routing/world_graph.hpp @@ -78,7 +78,7 @@ public: virtual double CalcSegmentETA(Segment const & segment) = 0; /// \returns transitions for mwm with id |numMwmId|. - virtual std::vector<Segment> const & GetTransitions(NumMwmId numMwmId, bool isEnter) = 0; + virtual std::vector<Segment> const & GetTransitions(NumMwmId numMwmId, bool isEnter); virtual bool IsRoutingOptionsGood(Segment const & /* segment */); virtual RoutingOptions GetRoutingOptions(Segment const & /* segment */); @@ -87,7 +87,7 @@ public: /// \returns transit-specific information for segment. For nontransit segments returns nullptr. virtual std::unique_ptr<TransitInfo> GetTransitInfo(Segment const & segment) = 0; - virtual std::vector<RouteSegment::SpeedCamera> GetSpeedCamInfo(Segment const & segment) = 0; + virtual std::vector<RouteSegment::SpeedCamera> GetSpeedCamInfo(Segment const & segment); virtual IndexGraph & GetIndexGraph(NumMwmId numMwmId) = 0; |