diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2019-05-22 12:21:37 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-05-22 13:53:14 +0300 |
commit | f60cb4805f4a1318078915ad17fdec7146af10d5 (patch) | |
tree | 047c4e953d9181a334d24229a74d9559129734d6 /routing | |
parent | 04394def48acc692bdf38184c383d47992f2b0b5 (diff) |
[storage][style] Style fixes.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/routing_benchmarks/bicycle_routing_tests.cpp | 13 | ||||
-rw-r--r-- | routing/routing_integration_tests/routing_test_tools.hpp | 44 |
2 files changed, 31 insertions, 26 deletions
diff --git a/routing/routing_benchmarks/bicycle_routing_tests.cpp b/routing/routing_benchmarks/bicycle_routing_tests.cpp index 4c9059f7b1..e88b1c13ac 100644 --- a/routing/routing_benchmarks/bicycle_routing_tests.cpp +++ b/routing/routing_benchmarks/bicycle_routing_tests.cpp @@ -9,6 +9,7 @@ #include "geometry/mercator.hpp" +#include <memory> #include <set> #include <string> @@ -25,17 +26,17 @@ public: protected: // RoutingTest overrides: - unique_ptr<routing::IDirectionsEngine> CreateDirectionsEngine( - shared_ptr<routing::NumMwmIds> numMwmIds) override + std::unique_ptr<routing::IDirectionsEngine> CreateDirectionsEngine( + std::shared_ptr<routing::NumMwmIds> numMwmIds) override { - unique_ptr<routing::IDirectionsEngine> engine(new routing::BicycleDirectionsEngine( - m_dataSource, numMwmIds)); + std::unique_ptr<routing::IDirectionsEngine> engine( + new routing::BicycleDirectionsEngine(m_dataSource, numMwmIds)); return engine; } - unique_ptr<routing::VehicleModelFactoryInterface> CreateModelFactory() override + std::unique_ptr<routing::VehicleModelFactoryInterface> CreateModelFactory() override { - unique_ptr<routing::VehicleModelFactoryInterface> factory( + std::unique_ptr<routing::VehicleModelFactoryInterface> factory( new SimplifiedModelFactory<routing::BicycleModel>()); return factory; } diff --git a/routing/routing_integration_tests/routing_test_tools.hpp b/routing/routing_integration_tests/routing_test_tools.hpp index 582d3016bb..ca18a7dcd8 100644 --- a/routing/routing_integration_tests/routing_test_tools.hpp +++ b/routing/routing_integration_tests/routing_test_tools.hpp @@ -9,6 +9,7 @@ #include "platform/local_country_file.hpp" +#include <cstdint> #include <memory> #include <set> #include <string> @@ -46,20 +47,21 @@ typedef std::pair<std::shared_ptr<Route>, RouterResultCode> TRouteResult; namespace integration { -shared_ptr<model::FeaturesFetcher> CreateFeaturesFetcher(vector<LocalCountryFile> const & localFiles); +std::shared_ptr<model::FeaturesFetcher> CreateFeaturesFetcher( + std::vector<LocalCountryFile> const & localFiles); -unique_ptr<storage::CountryInfoGetter> CreateCountryInfoGetter(); +std::unique_ptr<storage::CountryInfoGetter> CreateCountryInfoGetter(); -unique_ptr<IndexRouter> CreateVehicleRouter(DataSource & dataSource, - storage::CountryInfoGetter const & infoGetter, - traffic::TrafficCache const & trafficCache, - vector<LocalCountryFile> const & localFiles, - VehicleType vehicleType); +std::unique_ptr<IndexRouter> CreateVehicleRouter(DataSource & dataSource, + storage::CountryInfoGetter const & infoGetter, + traffic::TrafficCache const & trafficCache, + std::vector<LocalCountryFile> const & localFiles, + VehicleType vehicleType); class IRouterComponents { public: - IRouterComponents(vector<LocalCountryFile> const & localFiles) + IRouterComponents(std::vector<LocalCountryFile> const & localFiles) : m_featuresFetcher(CreateFeaturesFetcher(localFiles)), m_infoGetter(CreateCountryInfoGetter()) { } @@ -71,17 +73,17 @@ public: storage::CountryInfoGetter const & GetCountryInfoGetter() const noexcept { return *m_infoGetter; } protected: - shared_ptr<model::FeaturesFetcher> m_featuresFetcher; - unique_ptr<storage::CountryInfoGetter> m_infoGetter; + std::shared_ptr<model::FeaturesFetcher> m_featuresFetcher; + std::unique_ptr<storage::CountryInfoGetter> m_infoGetter; }; class VehicleRouterComponents : public IRouterComponents { public: - VehicleRouterComponents(vector<LocalCountryFile> const & localFiles, VehicleType vehicleType) + VehicleRouterComponents(std::vector<LocalCountryFile> const & localFiles, VehicleType vehicleType) : IRouterComponents(localFiles) - , m_indexRouter(CreateVehicleRouter(m_featuresFetcher->GetDataSource(), *m_infoGetter, m_trafficCache, - localFiles, vehicleType)) + , m_indexRouter(CreateVehicleRouter(m_featuresFetcher->GetDataSource(), *m_infoGetter, + m_trafficCache, localFiles, vehicleType)) { } @@ -89,16 +91,18 @@ public: private: traffic::TrafficCache m_trafficCache; - unique_ptr<IndexRouter> m_indexRouter; + std::unique_ptr<IndexRouter> m_indexRouter; }; -void GetAllLocalFiles(vector<LocalCountryFile> & localFiles); +void GetAllLocalFiles(std::vector<LocalCountryFile> & localFiles); void TestOnlineCrosses(ms::LatLon const & startPoint, ms::LatLon const & finalPoint, - vector<string> const & expected, IRouterComponents & routerComponents); + std::vector<std::string> const & expected, + IRouterComponents & routerComponents); void TestOnlineFetcher(ms::LatLon const & startPoint, ms::LatLon const & finalPoint, - vector<string> const & expected, IRouterComponents & routerComponents); + std::vector<std::string> const & expected, + IRouterComponents & routerComponents); -shared_ptr<VehicleRouterComponents> CreateAllMapsComponents(VehicleType vehicleType); +std::shared_ptr<VehicleRouterComponents> CreateAllMapsComponents(VehicleType vehicleType); IRouterComponents & GetVehicleComponents(VehicleType vehicleType); TRouteResult CalculateRoute(IRouterComponents const & routerComponents, @@ -166,7 +170,7 @@ public: /// inaccuracy is set in meters. TestTurn GetNthTurn(Route const & route, uint32_t turnNumber); -void TestCurrentStreetName(routing::Route const & route, string const & expectedStreetName); +void TestCurrentStreetName(routing::Route const & route, std::string const & expectedStreetName); -void TestNextStreetName(routing::Route const & route, string const & expectedStreetName); +void TestNextStreetName(routing::Route const & route, std::string const & expectedStreetName); } // namespace integration |