diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-04-12 15:52:08 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-04-12 18:30:29 +0300 |
commit | a685936cae13b6a51028d1db0d023c5ab8ba09ca (patch) | |
tree | beaa4ed74e5283b4ed7362f6362279ba86f07946 /routing | |
parent | ce150f2169b1539eda6e845230102c8eca6e4d3a (diff) |
[std] Use new include style for coding, fixes.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/cross_mwm_connector_serialization.hpp | 7 | ||||
-rw-r--r-- | routing/cross_mwm_graph.hpp | 3 | ||||
-rw-r--r-- | routing/index_graph_serialization.hpp | 2 | ||||
-rw-r--r-- | routing/routing_tests/coding_test.cpp | 5 |
4 files changed, 10 insertions, 7 deletions
diff --git a/routing/cross_mwm_connector_serialization.hpp b/routing/cross_mwm_connector_serialization.hpp index 9f12a14135..b1d6bc2f9e 100644 --- a/routing/cross_mwm_connector_serialization.hpp +++ b/routing/cross_mwm_connector_serialization.hpp @@ -20,6 +20,7 @@ #include <algorithm> #include <array> #include <cstdint> +#include <limits> #include <type_traits> #include <vector> @@ -455,9 +456,9 @@ private: template <typename T> static T GetBitsPerMask() { - static_assert( - static_cast<size_t>(VehicleType::Count) <= static_cast<size_t>(numeric_limits<T>::max()), - "Can't pack VehicleType::Count into chosen type"); + static_assert(static_cast<size_t>(VehicleType::Count) <= + static_cast<size_t>(std::numeric_limits<T>::max()), + "Can't pack VehicleType::Count into chosen type"); return static_cast<T>(VehicleType::Count); } diff --git a/routing/cross_mwm_graph.hpp b/routing/cross_mwm_graph.hpp index b46b545f23..f600e26122 100644 --- a/routing/cross_mwm_graph.hpp +++ b/routing/cross_mwm_graph.hpp @@ -35,7 +35,8 @@ public: NoSection, }; - CrossMwmGraph(std::shared_ptr<NumMwmIds> numMwmIds, shared_ptr<m4::Tree<NumMwmId>> numMwmTree, + CrossMwmGraph(std::shared_ptr<NumMwmIds> numMwmIds, + std::shared_ptr<m4::Tree<NumMwmId>> numMwmTree, std::shared_ptr<VehicleModelFactoryInterface> vehicleModelFactory, VehicleType vehicleType, CourntryRectFn const & countryRectFn, DataSource & dataSource); diff --git a/routing/index_graph_serialization.hpp b/routing/index_graph_serialization.hpp index e751e6e36e..b9abec9fed 100644 --- a/routing/index_graph_serialization.hpp +++ b/routing/index_graph_serialization.hpp @@ -333,7 +333,7 @@ private: Joint::Id jointId; }; - static_assert(is_integral<Joint::Id>::value, "Joint::Id should be integral type"); + static_assert(std::is_integral<Joint::Id>::value, "Joint::Id should be integral type"); IndexGraph & m_graph; Joint::Id m_count = 0; diff --git a/routing/routing_tests/coding_test.cpp b/routing/routing_tests/coding_test.cpp index 5ba6b5ca4a..0702a86673 100644 --- a/routing/routing_tests/coding_test.cpp +++ b/routing/routing_tests/coding_test.cpp @@ -2,6 +2,7 @@ #include "routing/coding.hpp" +#include <cstdint> #include <limits> #include <type_traits> @@ -12,11 +13,11 @@ namespace template <typename T, typename ToDo> void ForEachNumber(ToDo && toDo) { - for (T number = numeric_limits<T>::min();; ++number) + for (T number = std::numeric_limits<T>::min();; ++number) { toDo(number); - if (number == numeric_limits<T>::max()) + if (number == std::numeric_limits<T>::max()) break; } } |