diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2019-04-30 12:44:09 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <bykoianko@gmail.com> | 2019-05-06 14:05:29 +0300 |
commit | 3553e5591f7bd437c46cf91e25b86fffd9ee9c49 (patch) | |
tree | 7a68557e906a1ce4181f76ee84eb1226219d6703 /routing | |
parent | 730d74ceef9dcda9d3877fb8d990c4a6e5429632 (diff) |
Review fixes
Diffstat (limited to 'routing')
-rw-r--r-- | routing/index_graph.cpp | 6 | ||||
-rw-r--r-- | routing/index_graph.hpp | 1 | ||||
-rw-r--r-- | routing/routing_tests/index_graph_tools.cpp | 2 | ||||
-rw-r--r-- | routing/routing_tests/index_graph_tools.hpp | 8 | ||||
-rw-r--r-- | routing/routing_tests/restriction_test.cpp | 1 |
5 files changed, 9 insertions, 9 deletions
diff --git a/routing/index_graph.cpp b/routing/index_graph.cpp index 7d7c843dd3..e480122df9 100644 --- a/routing/index_graph.cpp +++ b/routing/index_graph.cpp @@ -163,10 +163,10 @@ void IndexGraph::SetRestrictions(RestrictionVec && restrictions) { ASSERT(!restriction.empty(), ()); auto & forward = m_restrictionsForward[restriction.back()]; - forward.emplace_back(restriction.begin(), std::prev(restriction.end())); - std::reverse(forward.back().begin(), forward.back().end()); + forward.emplace_back(restriction.begin(), prev(restriction.end())); + reverse(forward.back().begin(), forward.back().end()); - m_restrictionsBackward[restriction.front()].emplace_back(std::next(restriction.begin()), restriction.end()); + m_restrictionsBackward[restriction.front()].emplace_back(next(restriction.begin()), restriction.end()); } LOG(LDEBUG, ("Restrictions are loaded in:", timer.ElapsedNano() / 1e6, "ms")); diff --git a/routing/index_graph.hpp b/routing/index_graph.hpp index 64507a62ae..b29620167d 100644 --- a/routing/index_graph.hpp +++ b/routing/index_graph.hpp @@ -17,7 +17,6 @@ #include <cstdint> #include <map> #include <memory> -#include <memory> #include <unordered_map> #include <utility> #include <vector> diff --git a/routing/routing_tests/index_graph_tools.cpp b/routing/routing_tests/index_graph_tools.cpp index 221e1100c7..8f449c3c48 100644 --- a/routing/routing_tests/index_graph_tools.cpp +++ b/routing/routing_tests/index_graph_tools.cpp @@ -321,7 +321,7 @@ unique_ptr<SingleVehicleWorldGraph> BuildWorldGraph(unique_ptr<ZeroGeometryLoade auto indexLoader = make_unique<TestIndexGraphLoader>(); indexLoader->AddGraph(kTestNumMwmId, move(graph)); return make_unique<SingleVehicleWorldGraph>(nullptr /* crossMwmGraph */, move(indexLoader), - estimator); + estimator); } unique_ptr<TransitWorldGraph> BuildWorldGraph(unique_ptr<TestGeometryLoader> geometryLoader, diff --git a/routing/routing_tests/index_graph_tools.hpp b/routing/routing_tests/index_graph_tools.hpp index 58ee0ccea5..7c1f0d0998 100644 --- a/routing/routing_tests/index_graph_tools.hpp +++ b/routing/routing_tests/index_graph_tools.hpp @@ -233,11 +233,11 @@ private: }; std::unique_ptr<SingleVehicleWorldGraph> BuildWorldGraph(std::unique_ptr<TestGeometryLoader> loader, - std::shared_ptr<EdgeEstimator> estimator, - std::vector<Joint> const & joints); + std::shared_ptr<EdgeEstimator> estimator, + std::vector<Joint> const & joints); std::unique_ptr<SingleVehicleWorldGraph> BuildWorldGraph(std::unique_ptr<ZeroGeometryLoader> loader, - std::shared_ptr<EdgeEstimator> estimator, - std::vector<Joint> const & joints); + std::shared_ptr<EdgeEstimator> estimator, + std::vector<Joint> const & joints); AStarAlgorithm<Segment, SegmentEdge, RouteWeight>::Result CalculateRoute( IndexGraphStarter & starter, std::vector<Segment> & roadPoints, double & timeSec); diff --git a/routing/routing_tests/restriction_test.cpp b/routing/routing_tests/restriction_test.cpp index d8bfc3f90d..7e3a61e1a8 100644 --- a/routing/routing_tests/restriction_test.cpp +++ b/routing/routing_tests/restriction_test.cpp @@ -16,6 +16,7 @@ namespace routing_test { +using namespace std; using namespace routing; // Finish |