diff options
author | Maxim Pimenov <m@maps.me> | 2019-09-21 04:19:17 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2019-09-23 13:25:26 +0300 |
commit | bfc0b02cea972a7e6f18894119fb4e0dba770cd6 (patch) | |
tree | a0ed8a70f2c4da79323dfa37b24163fbca29519c /routing | |
parent | 041975fa23340191fcc0d56a6bd7bc91cfc7981b (diff) |
Got rid of the old style std/ includes for several files, mostly in map/ and platform/.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/bicycle_directions.hpp | 7 | ||||
-rw-r--r-- | routing/cross_mwm_graph.hpp | 4 | ||||
-rw-r--r-- | routing/directions_engine.hpp | 6 | ||||
-rw-r--r-- | routing/index_router.hpp | 7 | ||||
-rw-r--r-- | routing/online_cross_fetcher.hpp | 4 | ||||
-rw-r--r-- | routing/pedestrian_directions.hpp | 7 | ||||
-rw-r--r-- | routing/road_graph.hpp | 7 | ||||
-rw-r--r-- | routing/routing_integration_tests/pedestrian_route_test.cpp | 8 | ||||
-rw-r--r-- | routing/routing_integration_tests/turn_test.cpp | 4 | ||||
-rw-r--r-- | routing/routing_tests/routing_algorithm.hpp | 10 | ||||
-rw-r--r-- | routing/routing_tests/turns_sound_test.cpp | 4 | ||||
-rw-r--r-- | routing/transit_world_graph.hpp | 2 | ||||
-rw-r--r-- | routing/turns_notification_manager.hpp | 7 | ||||
-rw-r--r-- | routing/turns_sound_settings.hpp | 2 |
14 files changed, 46 insertions, 33 deletions
diff --git a/routing/bicycle_directions.hpp b/routing/bicycle_directions.hpp index a8571585ca..da42a1a6ab 100644 --- a/routing/bicycle_directions.hpp +++ b/routing/bicycle_directions.hpp @@ -12,6 +12,7 @@ #include <map> #include <memory> +#include <vector> namespace routing { @@ -32,10 +33,10 @@ public: BicycleDirectionsEngine(DataSource const & dataSource, std::shared_ptr<NumMwmIds> numMwmIds); // IDirectionsEngine override: - bool Generate(IndexRoadGraph const & graph, vector<Junction> const & path, + bool Generate(IndexRoadGraph const & graph, std::vector<Junction> const & path, base::Cancellable const & cancellable, Route::TTurns & turns, - Route::TStreets & streetNames, vector<Junction> & routeGeometry, - vector<Segment> & segments) override; + Route::TStreets & streetNames, std::vector<Junction> & routeGeometry, + std::vector<Segment> & segments) override; void Clear() override; private: diff --git a/routing/cross_mwm_graph.hpp b/routing/cross_mwm_graph.hpp index f600e26122..aeae81ec35 100644 --- a/routing/cross_mwm_graph.hpp +++ b/routing/cross_mwm_graph.hpp @@ -101,7 +101,7 @@ public: bool IsFeatureTransit(NumMwmId numMwmId, uint32_t featureId); /// \brief Checks whether feature where |segment| is placed is a cross mwm connector. /// If yes twin-segments are saved to |twins|. - void GetTwinFeature(Segment const & segment, bool isOutgoing, vector<Segment> & twins); + void GetTwinFeature(Segment const & segment, bool isOutgoing, std::vector<Segment> & twins); private: MwmStatus GetMwmStatus(NumMwmId numMwmId, std::string const & sectionName) const; @@ -129,5 +129,5 @@ private: CrossMwmIndexGraph<connector::TransitId> m_crossMwmTransitGraph; }; -string DebugPrint(CrossMwmGraph::MwmStatus status); +std::string DebugPrint(CrossMwmGraph::MwmStatus status); } // routing diff --git a/routing/directions_engine.hpp b/routing/directions_engine.hpp index 460821b9d0..af2bf27ee4 100644 --- a/routing/directions_engine.hpp +++ b/routing/directions_engine.hpp @@ -23,10 +23,10 @@ public: /// \brief Generates all args which are passed by reference. /// \param path is points of the route. It should not be empty. /// \returns true if fields passed by reference are filled correctly and false otherwise. - virtual bool Generate(IndexRoadGraph const & graph, vector<Junction> const & path, + virtual bool Generate(IndexRoadGraph const & graph, std::vector<Junction> const & path, base::Cancellable const & cancellable, Route::TTurns & turns, - Route::TStreets & streetNames, vector<Junction> & routeGeometry, - vector<Segment> & segments) = 0; + Route::TStreets & streetNames, std::vector<Junction> & routeGeometry, + std::vector<Segment> & segments) = 0; virtual void Clear() = 0; }; } // namespace routing diff --git a/routing/index_router.hpp b/routing/index_router.hpp index e460b9c4a3..8d5eb7e915 100644 --- a/routing/index_router.hpp +++ b/routing/index_router.hpp @@ -148,9 +148,10 @@ private: // Input route may contains 'leaps': shortcut edges from mwm border enter to exit. // ProcessLeaps replaces each leap with calculated route through mwm. - RouterResultCode ProcessLeapsJoints(vector<Segment> const & input, RouterDelegate const & delegate, - WorldGraphMode prevMode, IndexGraphStarter & starter, - AStarProgress & progress, vector<Segment> & output); + RouterResultCode ProcessLeapsJoints(std::vector<Segment> const & input, + RouterDelegate const & delegate, WorldGraphMode prevMode, + IndexGraphStarter & starter, AStarProgress & progress, + std::vector<Segment> & output); RouterResultCode RedressRoute(std::vector<Segment> const & segments, RouterDelegate const & delegate, IndexGraphStarter & starter, Route & route) const; diff --git a/routing/online_cross_fetcher.hpp b/routing/online_cross_fetcher.hpp index 325458dc14..f3b91395f7 100644 --- a/routing/online_cross_fetcher.hpp +++ b/routing/online_cross_fetcher.hpp @@ -22,8 +22,8 @@ namespace routing /// \param finalPoint Coordinates of a finish point. /// \return URL for OSRM MAPS.ME server request. /// \see MapsMePlugin.hpp for REST protocol. -string GenerateOnlineRequest(std::string const & serverURL, ms::LatLon const & startPoint, - ms::LatLon const & finalPoint); +std::string GenerateOnlineRequest(std::string const & serverURL, ms::LatLon const & startPoint, + ms::LatLon const & finalPoint); /// \brief ParseResponse MAPS.ME OSRM server response parser. /// \param serverResponse Server response data. diff --git a/routing/pedestrian_directions.hpp b/routing/pedestrian_directions.hpp index 0e5f9f98bb..ad02dbae1f 100644 --- a/routing/pedestrian_directions.hpp +++ b/routing/pedestrian_directions.hpp @@ -5,6 +5,7 @@ #include "routing_common/num_mwm_id.hpp" #include <memory> +#include <vector> namespace routing { @@ -15,10 +16,10 @@ public: PedestrianDirectionsEngine(std::shared_ptr<NumMwmIds> numMwmIds); // IDirectionsEngine override: - bool Generate(IndexRoadGraph const & graph, vector<Junction> const & path, + bool Generate(IndexRoadGraph const & graph, std::vector<Junction> const & path, base::Cancellable const & cancellable, Route::TTurns & turns, - Route::TStreets & streetNames, vector<Junction> & routeGeometry, - vector<Segment> & segments) override; + Route::TStreets & streetNames, std::vector<Junction> & routeGeometry, + std::vector<Segment> & segments) override; void Clear() override {} private: diff --git a/routing/road_graph.hpp b/routing/road_graph.hpp index 8f3cc1d68c..008c5d100d 100644 --- a/routing/road_graph.hpp +++ b/routing/road_graph.hpp @@ -16,6 +16,7 @@ #include <functional> #include <initializer_list> #include <map> +#include <string> #include <utility> #include <vector> @@ -42,7 +43,7 @@ public: inline feature::TAltitude GetAltitude() const { return m_altitude; } private: - friend string DebugPrint(Junction const & r); + friend std::string DebugPrint(Junction const & r); // Point of the junction m2::PointD m_point; @@ -115,7 +116,7 @@ private: bool forward, uint32_t segId, Junction const & startJunction, Junction const & endJunction); - friend string DebugPrint(Edge const & r); + friend std::string DebugPrint(Edge const & r); Type m_type = Type::FakeWithoutRealPart; @@ -376,7 +377,7 @@ private: std::map<Junction, EdgeVector> m_fakeOutgoingEdges; }; -string DebugPrint(IRoadGraph::Mode mode); +std::string DebugPrint(IRoadGraph::Mode mode); IRoadGraph::RoadInfo MakeRoadInfoForTesting(bool bidirectional, double speedKMPH, std::initializer_list<m2::PointD> const & points); diff --git a/routing/routing_integration_tests/pedestrian_route_test.cpp b/routing/routing_integration_tests/pedestrian_route_test.cpp index cc0634f86b..b6bc48647a 100644 --- a/routing/routing_integration_tests/pedestrian_route_test.cpp +++ b/routing/routing_integration_tests/pedestrian_route_test.cpp @@ -6,6 +6,8 @@ #include "geometry/mercator.hpp" +#include <vector> + using namespace routing; using namespace routing::turns; @@ -393,7 +395,7 @@ UNIT_TEST(RussiaZgradPanfilovskyUndergroundCrossing) RouterResultCode const result = routeResult.second; TEST_EQUAL(result, RouterResultCode::NoError, ()); - vector<turns::TurnItem> t; + std::vector<turns::TurnItem> t; route.GetTurnsForTesting(t); TEST_EQUAL(t.size(), 3, ()); @@ -413,7 +415,7 @@ UNIT_TEST(RussiaMoscowHydroprojectBridgeCrossing) RouterResultCode const result = routeResult.second; TEST_EQUAL(result, RouterResultCode::NoError, ()); - vector<turns::TurnItem> t; + std::vector<turns::TurnItem> t; route.GetTurnsForTesting(t); TEST_EQUAL(t.size(), 3, ()); @@ -433,7 +435,7 @@ UNIT_TEST(BelarusMinskRenaissanceHotelUndergroundCross) RouterResultCode const result = routeResult.second; TEST_EQUAL(result, RouterResultCode::NoError, ()); - vector<turns::TurnItem> t; + std::vector<turns::TurnItem> t; route.GetTurnsForTesting(t); TEST_EQUAL(t.size(), 3, ()); diff --git a/routing/routing_integration_tests/turn_test.cpp b/routing/routing_integration_tests/turn_test.cpp index 116fd808d8..617f78ec90 100644 --- a/routing/routing_integration_tests/turn_test.cpp +++ b/routing/routing_integration_tests/turn_test.cpp @@ -5,6 +5,8 @@ #include "routing/route.hpp" #include "routing/routing_callbacks.hpp" +#include <vector> + using namespace routing; using namespace routing::turns; @@ -246,7 +248,7 @@ UNIT_TEST(RussiaMoscowPankratevskiPerBolshaySuharedskazPloschadTurnTest) TEST_EQUAL(result, RouterResultCode::NoError, ()); - vector<turns::TurnItem> t; + std::vector<turns::TurnItem> t; route.GetTurnsForTesting(t); // It's not possible to get destination with less number of turns due to oneway roads. TEST_GREATER_OR_EQUAL(t.size(), 5, ()); diff --git a/routing/routing_tests/routing_algorithm.hpp b/routing/routing_tests/routing_algorithm.hpp index 6fd8a938a7..48614092b5 100644 --- a/routing/routing_tests/routing_algorithm.hpp +++ b/routing/routing_tests/routing_algorithm.hpp @@ -33,13 +33,13 @@ public: // AStarGraph overrides // @{ - void GetIngoingEdgesList(Vertex const & v, vector<Edge> & adj) override; - void GetOutgoingEdgesList(Vertex const & v, vector<Edge> & adj) override; + void GetIngoingEdgesList(Vertex const & v, std::vector<Edge> & adj) override; + void GetOutgoingEdgesList(Vertex const & v, std::vector<Edge> & adj) override; double HeuristicCostEstimate(Vertex const & v, Vertex const & w) override; // @} private: - void GetAdjacencyList(Vertex v, vector<Edge> & adj) const; + void GetAdjacencyList(Vertex v, std::vector<Edge> & adj) const; std::map<uint32_t, std::vector<Edge>> m_adjs; }; @@ -53,8 +53,8 @@ public: void AddEdge(Vertex from, Vertex to, Weight w); - void GetIngoingEdgesList(Vertex const & v, vector<Edge> & adj); - void GetOutgoingEdgesList(Vertex const & v, vector<Edge> & adj); + void GetIngoingEdgesList(Vertex const & v, std::vector<Edge> & adj); + void GetOutgoingEdgesList(Vertex const & v, std::vector<Edge> & adj); private: std::map<uint32_t, std::vector<Edge>> m_outgoing; diff --git a/routing/routing_tests/turns_sound_test.cpp b/routing/routing_tests/turns_sound_test.cpp index a98e75e7f5..f419110c43 100644 --- a/routing/routing_tests/turns_sound_test.cpp +++ b/routing/routing_tests/turns_sound_test.cpp @@ -5,6 +5,10 @@ #include "platform/location.hpp" +#include <vector> + +using namespace std; + namespace { // A error to compare two double after conversion feet to meters. diff --git a/routing/transit_world_graph.hpp b/routing/transit_world_graph.hpp index 043cbd8822..e80b177c26 100644 --- a/routing/transit_world_graph.hpp +++ b/routing/transit_world_graph.hpp @@ -87,7 +87,7 @@ private: RoadGeometry const & GetRealRoadGeometry(NumMwmId mwmId, uint32_t featureId); void AddRealEdges(Segment const & segment, bool isOutgoing, bool useRoutingOptions, - vector<SegmentEdge> & edges); + std::vector<SegmentEdge> & edges); TransitGraph & GetTransitGraph(NumMwmId mwmId); std::unique_ptr<CrossMwmGraph> m_crossMwmGraph; diff --git a/routing/turns_notification_manager.hpp b/routing/turns_notification_manager.hpp index ff3d000c48..df1c8bec83 100644 --- a/routing/turns_notification_manager.hpp +++ b/routing/turns_notification_manager.hpp @@ -8,6 +8,7 @@ #include <cstdint> #include <string> +#include <vector> namespace location { @@ -124,7 +125,7 @@ class NotificationManager /// for a turn once it will return the same value until the turn is changed. /// \note This method works independent from m_enabled value. /// So it works when the class enable and disable. - CarDirection GenerateSecondTurnNotification(vector<TurnItemDist> const & turns); + CarDirection GenerateSecondTurnNotification(std::vector<TurnItemDist> const & turns); public: NotificationManager() @@ -159,8 +160,8 @@ public: /// \param distanceToTurnMeters is distance to the next turn in meters. /// \param turnNotifications is a parameter to fill it if it's necessary. /// \note The client implies turnNotifications does not contain empty strings. - void GenerateTurnNotifications(vector<TurnItemDist> const & turns, - vector<std::string> & turnNotifications); + void GenerateTurnNotifications(std::vector<TurnItemDist> const & turns, + std::vector<std::string> & turnNotifications); /// Reset states which reflects current route position. /// The method shall be called after creating a new route or after rerouting. diff --git a/routing/turns_sound_settings.hpp b/routing/turns_sound_settings.hpp index 7771750884..c05071decc 100644 --- a/routing/turns_sound_settings.hpp +++ b/routing/turns_sound_settings.hpp @@ -156,7 +156,7 @@ struct Notification } }; -string DebugPrint(Notification const & turnGeom); +std::string DebugPrint(Notification const & turnGeom); using PairDist = std::pair<uint32_t, char const *>; using VecPairDist = std::vector<PairDist>; |