diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-06-08 10:38:41 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-06-17 19:36:51 +0300 |
commit | 97a2bab208945d75de78fd07527084e7d34b3b8c (patch) | |
tree | c5bbf369014996d57e71044ecc28afef2fbbfa44 /routing | |
parent | 4cac8206b33bf59fb44e039580fe312c31d7a5dd (diff) |
git-clang-format
Diffstat (limited to 'routing')
-rw-r--r-- | routing/bicycle_model.cpp | 13 | ||||
-rw-r--r-- | routing/bicycle_model.hpp | 5 | ||||
-rw-r--r-- | routing/features_road_graph.cpp | 5 | ||||
-rw-r--r-- | routing/pedestrian_model.cpp | 9 | ||||
-rw-r--r-- | routing/pedestrian_model.hpp | 5 | ||||
-rw-r--r-- | routing/routing_tests/vehicle_model_test.cpp | 1 | ||||
-rw-r--r-- | routing/vehicle_model.hpp | 3 |
7 files changed, 12 insertions, 29 deletions
diff --git a/routing/bicycle_model.cpp b/routing/bicycle_model.cpp index c5e4798a81..c662d38545 100644 --- a/routing/bicycle_model.cpp +++ b/routing/bicycle_model.cpp @@ -601,17 +601,14 @@ BicycleModel::BicycleModel(VehicleModel::InitListT const & speedLimits) void BicycleModel::Init() { - initializer_list<char const *> hwtagYesbicycle = { "hwtag", "yesbicycle" }; + initializer_list<char const *> hwtagYesbicycle = {"hwtag", "yesbicycle"}; m_yesBicycleType = classif().GetTypeByPath(hwtagYesbicycle); - m_noBicycleType = classif().GetTypeByPath({ "hwtag", "nobicycle" }); - m_bicycleBidirType = classif().GetTypeByPath({ "hwtag", "bicycle_bidir" }); + m_noBicycleType = classif().GetTypeByPath({"hwtag", "nobicycle"}); + m_bicycleBidirType = classif().GetTypeByPath({"hwtag", "bicycle_bidir"}); - initializer_list<char const *> arr[] = - { - hwtagYesbicycle, - { "route", "ferry" }, - { "man_made", "pier" }, + initializer_list<char const *> arr[] = { + hwtagYesbicycle, {"route", "ferry"}, {"man_made", "pier"}, }; SetAdditionalRoadTypes(classif(), arr, ARRAY_SIZE(arr)); diff --git a/routing/bicycle_model.hpp b/routing/bicycle_model.hpp index 64e1ded4d0..bd4185a8c4 100644 --- a/routing/bicycle_model.hpp +++ b/routing/bicycle_model.hpp @@ -17,11 +17,6 @@ public: /// VehicleModel overrides: double GetSpeed(FeatureType const & f) const override; bool IsOneWay(FeatureType const & f) const override; - /// @returns true if |f| could be considered as a road. - /// @note If BicycleModel::IsRoad(f) returns false for a feature f and for an instance - /// of |BicycleModel| created by default constructor - /// BicycleModel::IsRoad(f) for the same feature f and for any instance - /// of |BicycleModel| created by |BicycleModel(VehicleModel::InitListT const &)| must return false. bool IsRoad(FeatureType const & f) const override; private: diff --git a/routing/features_road_graph.cpp b/routing/features_road_graph.cpp index 6d8711a006..62d8aa7829 100644 --- a/routing/features_road_graph.cpp +++ b/routing/features_road_graph.cpp @@ -241,10 +241,7 @@ void FeaturesRoadGraph::ClearState() m_mwmLocks.clear(); } -bool FeaturesRoadGraph::IsRoad(FeatureType const & ft) const -{ - return m_vehicleModel.IsRoad(ft); -} +bool FeaturesRoadGraph::IsRoad(FeatureType const & ft) const { return m_vehicleModel.IsRoad(ft); } bool FeaturesRoadGraph::IsOneWay(FeatureType const & ft) const { diff --git a/routing/pedestrian_model.cpp b/routing/pedestrian_model.cpp index 7820f390a3..26147ec7ba 100644 --- a/routing/pedestrian_model.cpp +++ b/routing/pedestrian_model.cpp @@ -621,16 +621,13 @@ PedestrianModel::PedestrianModel(VehicleModel::InitListT const & speedLimits) void PedestrianModel::Init() { - initializer_list<char const *> hwtagYesfoot = { "hwtag", "yesfoot" }; + initializer_list<char const *> hwtagYesfoot = {"hwtag", "yesfoot"}; m_noFootType = classif().GetTypeByPath({ "hwtag", "nofoot" }); m_yesFootType = classif().GetTypeByPath(hwtagYesfoot); - initializer_list<char const *> arr[] = - { - hwtagYesfoot, - { "route", "ferry" }, - { "man_made", "pier" }, + initializer_list<char const *> arr[] = { + hwtagYesfoot, {"route", "ferry"}, {"man_made", "pier"}, }; SetAdditionalRoadTypes(classif(), arr, ARRAY_SIZE(arr)); diff --git a/routing/pedestrian_model.hpp b/routing/pedestrian_model.hpp index 7b27868452..f513ec92c7 100644 --- a/routing/pedestrian_model.hpp +++ b/routing/pedestrian_model.hpp @@ -17,11 +17,6 @@ public: /// VehicleModel overrides: double GetSpeed(FeatureType const & f) const override; bool IsOneWay(FeatureType const &) const override { return false; } - /// @returns true if |f| could be considered as a road for pedestrian routing. - /// @note If PedestrianModel::IsRoad(f) returns false for a feature f and for an instance - /// of |PedestrianModel| created by default constructor - /// PedestrianModel::IsRoad(f) for the same feature f and for any instance - /// of |PedestrianModel| created by |PedestrianModel(VehicleModel::InitListT const &)| must return false. bool IsRoad(FeatureType const & f) const override; private: diff --git a/routing/routing_tests/vehicle_model_test.cpp b/routing/routing_tests/vehicle_model_test.cpp index 1215dbc5f6..4763ed78cd 100644 --- a/routing/routing_tests/vehicle_model_test.cpp +++ b/routing/routing_tests/vehicle_model_test.cpp @@ -23,6 +23,7 @@ class TestVehicleModel : public routing::VehicleModel { friend void CheckOneWay(initializer_list<uint32_t> const & types, bool expectedValue); friend void CheckSpeed(initializer_list<uint32_t> const & types, double expectedSpeed); + public: TestVehicleModel() : VehicleModel(classif(), s_testLimits) {} }; diff --git a/routing/vehicle_model.hpp b/routing/vehicle_model.hpp index ad8d927e7f..076819bdaa 100644 --- a/routing/vehicle_model.hpp +++ b/routing/vehicle_model.hpp @@ -68,7 +68,8 @@ public: /// @returns true if |m_types| or |m_addRoadTypes| contains |type| and false otherwise. bool IsRoadType(uint32_t type) const; - template <class TList> bool HasRoadType(TList const & types) const + template <class TList> + bool HasRoadType(TList const & types) const { for (uint32_t t : types) { |