Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-05 17:57:36 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-05 17:57:36 +0300
commit56a37cd83ac1a5f2f262e17483edfe3a86317772 (patch)
tree35fa6fcd8efffa64086d76a51238f6f1a5751bd8 /routing
parent61080424e2f36bd0eb121bf9b6f1965104148ceb (diff)
Review fixes.
Diffstat (limited to 'routing')
-rw-r--r--routing/edge_estimator.cpp16
-rw-r--r--routing/edge_estimator.hpp2
-rw-r--r--routing/routing_integration_tests/routing_test_tools.cpp4
-rw-r--r--routing/single_mwm_router.cpp4
-rw-r--r--routing/single_mwm_router.hpp2
5 files changed, 14 insertions, 14 deletions
diff --git a/routing/edge_estimator.cpp b/routing/edge_estimator.cpp
index e7f7f4a406..86c27e8415 100644
--- a/routing/edge_estimator.cpp
+++ b/routing/edge_estimator.cpp
@@ -12,7 +12,7 @@ double CalcTrafficFactor(SpeedGroup speedGroup)
{
double const percentage =
0.01 * static_cast<double>(kSpeedGroupThresholdPercentage[static_cast<size_t>(speedGroup)]);
- CHECK_GREATER(percentage, 0.0, ("speedGroup:", speedGroup));
+ CHECK_GREATER(percentage, 0.0, ("Speed group:", speedGroup));
return 1.0 / percentage;
}
} // namespace
@@ -32,7 +32,7 @@ inline double TimeBetweenSec(m2::PointD const & from, m2::PointD const & to, dou
class CarEdgeEstimator : public EdgeEstimator
{
public:
- CarEdgeEstimator(IVehicleModel const & vehicleModel, traffic::TrafficCache const & getter);
+ CarEdgeEstimator(IVehicleModel const & vehicleModel, traffic::TrafficCache const & trafficCache);
// EdgeEstimator overrides:
void Start(MwmSet::MwmId const & mwmId) override;
@@ -42,20 +42,20 @@ public:
double CalcHeuristic(m2::PointD const & from, m2::PointD const & to) const override;
private:
- TrafficCache const & m_trafficGetter;
+ TrafficCache const & m_trafficCache;
shared_ptr<traffic::TrafficInfo> m_trafficInfo;
double const m_maxSpeedMPS;
};
CarEdgeEstimator::CarEdgeEstimator(IVehicleModel const & vehicleModel,
- traffic::TrafficCache const & getter)
- : m_trafficGetter(getter), m_maxSpeedMPS(vehicleModel.GetMaxSpeed() * kKMPH2MPS)
+ traffic::TrafficCache const & trafficCache)
+ : m_trafficCache(trafficCache), m_maxSpeedMPS(vehicleModel.GetMaxSpeed() * kKMPH2MPS)
{
}
void CarEdgeEstimator::Start(MwmSet::MwmId const & mwmId)
{
- m_trafficInfo = m_trafficGetter.GetTrafficInfo(mwmId);
+ m_trafficInfo = m_trafficCache.GetTrafficInfo(mwmId);
}
void CarEdgeEstimator::Finish()
@@ -100,8 +100,8 @@ namespace routing
{
// static
shared_ptr<EdgeEstimator> EdgeEstimator::CreateForCar(IVehicleModel const & vehicleModel,
- traffic::TrafficCache const & getter)
+ traffic::TrafficCache const & trafficCache)
{
- return make_shared<CarEdgeEstimator>(vehicleModel, getter);
+ return make_shared<CarEdgeEstimator>(vehicleModel, trafficCache);
}
} // namespace routing
diff --git a/routing/edge_estimator.hpp b/routing/edge_estimator.hpp
index f837be1c01..f78f2a7c25 100644
--- a/routing/edge_estimator.hpp
+++ b/routing/edge_estimator.hpp
@@ -27,7 +27,7 @@ public:
static shared_ptr<EdgeEstimator> CreateForCar(IVehicleModel const & vehicleModel,
- traffic::TrafficCache const & getter);
+ traffic::TrafficCache const & trafficCache);
};
class EstimatorGuard final
diff --git a/routing/routing_integration_tests/routing_test_tools.cpp b/routing/routing_integration_tests/routing_test_tools.cpp
index d67e4e53a1..b49bd5dae6 100644
--- a/routing/routing_integration_tests/routing_test_tools.cpp
+++ b/routing/routing_integration_tests/routing_test_tools.cpp
@@ -79,14 +79,14 @@ namespace integration
unique_ptr<CarRouter> CreateCarRouter(Index & index,
storage::CountryInfoGetter const & infoGetter,
- traffic::TrafficCache const & trafficGetter)
+ traffic::TrafficCache const & trafficCache)
{
auto const countryFileGetter = [&infoGetter](m2::PointD const & pt) {
return infoGetter.GetRegionCountryId(pt);
};
auto carRouter = make_unique<CarRouter>(index, countryFileGetter,
- SingleMwmRouter::CreateCarRouter(index, trafficGetter));
+ SingleMwmRouter::CreateCarRouter(index, trafficCache));
return carRouter;
}
diff --git a/routing/single_mwm_router.cpp b/routing/single_mwm_router.cpp
index 120d45227d..89648b59b6 100644
--- a/routing/single_mwm_router.cpp
+++ b/routing/single_mwm_router.cpp
@@ -213,13 +213,13 @@ bool SingleMwmRouter::LoadIndex(MwmSet::MwmId const & mwmId, string const & coun
// static
unique_ptr<SingleMwmRouter> SingleMwmRouter::CreateCarRouter(
- Index const & index, traffic::TrafficCache const & getter)
+ Index const & index, traffic::TrafficCache const & trafficCache)
{
auto vehicleModelFactory = make_shared<CarModelFactory>();
// @TODO Bicycle turn generation engine is used now. It's ok for the time being.
// But later a special car turn generation engine should be implemented.
auto directionsEngine = make_unique<BicycleDirectionsEngine>(index);
- auto estimator = EdgeEstimator::CreateForCar(*vehicleModelFactory->GetVehicleModel(), getter);
+ auto estimator = EdgeEstimator::CreateForCar(*vehicleModelFactory->GetVehicleModel(), trafficCache);
auto router =
make_unique<SingleMwmRouter>("astar-bidirectional-car", index,
move(vehicleModelFactory), estimator, move(directionsEngine));
diff --git a/routing/single_mwm_router.hpp b/routing/single_mwm_router.hpp
index e351202200..fbc2413211 100644
--- a/routing/single_mwm_router.hpp
+++ b/routing/single_mwm_router.hpp
@@ -33,7 +33,7 @@ public:
Route & route);
static unique_ptr<SingleMwmRouter> CreateCarRouter(Index const & index,
- traffic::TrafficCache const & getter);
+ traffic::TrafficCache const & trafficCache);
private:
IRouter::ResultCode DoCalculateRoute(MwmSet::MwmId const & mwmId, m2::PointD const & startPoint,