diff --git a/routing/edge_estimator.cpp b/routing/edge_estimator.cpp index 40a324e1a0..c71ab691f1 100644 --- a/routing/edge_estimator.cpp +++ b/routing/edge_estimator.cpp @@ -138,7 +138,6 @@ public: // EdgeEstimator overrides: double GetUTurnPenalty() const override { return 0.0 /* seconds */; } - bool LeapIsAllowed(NumMwmId /* mwmId */) const override { return false; } double CalcSegmentWeight(Segment const & segment, RoadGeometry const & road) const override { @@ -162,7 +161,6 @@ public: // EdgeEstimator overrides: double GetUTurnPenalty() const override { return 20.0 /* seconds */; } - bool LeapIsAllowed(NumMwmId /* mwmId */) const override { return false; } double CalcSegmentWeight(Segment const & segment, RoadGeometry const & road) const override { @@ -186,7 +184,6 @@ public: double CalcSegmentWeight(Segment const & segment, RoadGeometry const & road) const override; double CalcSegmentETA(Segment const & segment, RoadGeometry const & road) const override; double GetUTurnPenalty() const override; - bool LeapIsAllowed(NumMwmId mwmId) const override; private: double CalcSegment(Purpose purpose, Segment const & segment, RoadGeometry const & road) const; @@ -217,8 +214,6 @@ double CarEstimator::GetUTurnPenalty() const return 2 * 60; // seconds } -bool CarEstimator::LeapIsAllowed(NumMwmId mwmId) const { return !m_trafficStash->Has(mwmId); } - double CarEstimator::CalcSegment(Purpose purpose, Segment const & segment, RoadGeometry const & road) const { double result = CalcClimbSegment(purpose, segment, road, GetCarClimbPenalty); diff --git a/routing/edge_estimator.hpp b/routing/edge_estimator.hpp index 4c0854c3ff..42fa906475 100644 --- a/routing/edge_estimator.hpp +++ b/routing/edge_estimator.hpp @@ -40,10 +40,6 @@ public: virtual double CalcSegmentWeight(Segment const & segment, RoadGeometry const & road) const = 0; virtual double CalcSegmentETA(Segment const & segment, RoadGeometry const & road) const = 0; virtual double GetUTurnPenalty() const = 0; - // The leap is the shortcut edge from mwm border enter to exit. - // Router can't use leaps on some mwms: e.g. mwm with loaded traffic data. - // Check wherether leap is allowed on specified mwm or not. - virtual bool LeapIsAllowed(NumMwmId mwmId) const = 0; static std::shared_ptr Create(VehicleType vehicleType, double maxWeighSpeedKMpH, double offroadSpeedKMpH, diff --git a/routing/routing_tests/index_graph_tools.cpp b/routing/routing_tests/index_graph_tools.cpp index b03abc5e37..07dd2d54c0 100644 --- a/routing/routing_tests/index_graph_tools.cpp +++ b/routing/routing_tests/index_graph_tools.cpp @@ -117,8 +117,6 @@ double WeightedEdgeEstimator::CalcSegmentWeight(Segment const & segment, double WeightedEdgeEstimator::GetUTurnPenalty() const { return 0.0; } -bool WeightedEdgeEstimator::LeapIsAllowed(NumMwmId /* mwmId */) const { return false; } - // TestIndexGraphTopology -------------------------------------------------------------------------- TestIndexGraphTopology::TestIndexGraphTopology(uint32_t numVertices) : m_numVertices(numVertices) {} diff --git a/routing/routing_tests/index_graph_tools.hpp b/routing/routing_tests/index_graph_tools.hpp index caa3d444e8..adf2e91081 100644 --- a/routing/routing_tests/index_graph_tools.hpp +++ b/routing/routing_tests/index_graph_tools.hpp @@ -141,7 +141,6 @@ public: double CalcSegmentWeight(Segment const & segment, RoadGeometry const & /* road */) const override; double CalcSegmentETA(Segment const & segment, RoadGeometry const & road) const override { return 0.0; } double GetUTurnPenalty() const override; - bool LeapIsAllowed(NumMwmId /* mwmId */) const override; private: map m_segmentWeights; diff --git a/routing/single_vehicle_world_graph.cpp b/routing/single_vehicle_world_graph.cpp index 3860fd61a8..c35a3de688 100644 --- a/routing/single_vehicle_world_graph.cpp +++ b/routing/single_vehicle_world_graph.cpp @@ -176,11 +176,6 @@ double SingleVehicleWorldGraph::CalcSegmentETA(Segment const & segment) return m_estimator->CalcSegmentETA(segment, GetRoadGeometry(segment.GetMwmId(), segment.GetFeatureId())); } -bool SingleVehicleWorldGraph::LeapIsAllowed(NumMwmId mwmId) const -{ - return m_estimator->LeapIsAllowed(mwmId); -} - vector const & SingleVehicleWorldGraph::GetTransitions(NumMwmId numMwmId, bool isEnter) { return m_crossMwmGraph->GetTransitions(numMwmId, isEnter); diff --git a/routing/single_vehicle_world_graph.hpp b/routing/single_vehicle_world_graph.hpp index e29e459084..4efd57de89 100644 --- a/routing/single_vehicle_world_graph.hpp +++ b/routing/single_vehicle_world_graph.hpp @@ -54,7 +54,6 @@ 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; - bool LeapIsAllowed(NumMwmId mwmId) const override; std::vector const & GetTransitions(NumMwmId numMwmId, bool isEnter) override; /// \returns true if feature, associated with segment satisfies users conditions. diff --git a/routing/transit_world_graph.cpp b/routing/transit_world_graph.cpp index a1b2882bdc..22eaa18cf7 100644 --- a/routing/transit_world_graph.cpp +++ b/routing/transit_world_graph.cpp @@ -164,8 +164,6 @@ double TransitWorldGraph::CalcSegmentETA(routing::Segment const & segment) return m_estimator->CalcSegmentETA(segment, GetRealRoadGeometry(segment.GetMwmId(), segment.GetFeatureId())); } -bool TransitWorldGraph::LeapIsAllowed(NumMwmId /* mwmId */) const { return false; } - vector const & TransitWorldGraph::GetTransitions(NumMwmId numMwmId, bool isEnter) { return kEmptyTransitions; diff --git a/routing/transit_world_graph.hpp b/routing/transit_world_graph.hpp index 453383e577..d3105aff96 100644 --- a/routing/transit_world_graph.hpp +++ b/routing/transit_world_graph.hpp @@ -59,7 +59,6 @@ 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; - bool LeapIsAllowed(NumMwmId mwmId) const override; std::vector const & GetTransitions(NumMwmId numMwmId, bool isEnter) override; std::unique_ptr GetTransitInfo(Segment const & segment) override; std::vector GetSpeedCamInfo(Segment const & segment) override; diff --git a/routing/world_graph.hpp b/routing/world_graph.hpp index d4d4dd082c..cec7ca985d 100644 --- a/routing/world_graph.hpp +++ b/routing/world_graph.hpp @@ -76,7 +76,6 @@ public: virtual RouteWeight CalcLeapWeight(m2::PointD const & from, m2::PointD const & to) const = 0; virtual RouteWeight CalcOffroadWeight(m2::PointD const & from, m2::PointD const & to) const = 0; virtual double CalcSegmentETA(Segment const & segment) = 0; - virtual bool LeapIsAllowed(NumMwmId mwmId) const = 0; /// \returns transitions for mwm with id |numMwmId|. virtual std::vector const & GetTransitions(NumMwmId numMwmId, bool isEnter) = 0;