diff --git a/routing_common/vehicle_model.cpp b/routing_common/vehicle_model.cpp index 2302a4f7a4..f4ea9d6539 100644 --- a/routing_common/vehicle_model.cpp +++ b/routing_common/vehicle_model.cpp @@ -177,8 +177,7 @@ VehicleModel::SpeedKMpH VehicleModel::GetTypeSpeed(feature::TypesHolder const & VehicleModel::SpeedKMpH VehicleModel::GetSpeedWihtoutMaxspeed(FeatureType & f, SpeedParams const & speedParams) const { - SpeedParams const withoutMaxspeed(speedParams.m_forward, speedParams.m_inCity, Maxspeed()); - return VehicleModel::GetSpeed(f, withoutMaxspeed); + return VehicleModel::GetSpeed(f, {speedParams.m_forward, speedParams.m_inCity, Maxspeed()}); } bool VehicleModel::IsOneWay(FeatureType & f) const diff --git a/routing_common/vehicle_model.hpp b/routing_common/vehicle_model.hpp index fa68464422..644d9823c7 100644 --- a/routing_common/vehicle_model.hpp +++ b/routing_common/vehicle_model.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include class Classificator; @@ -21,8 +22,8 @@ namespace routing /// \brief Params for calculation of an approximate speed on a feature. struct SpeedParams { - SpeedParams(bool forward, bool inCity, Maxspeed const & maxspeed) - : m_forward(forward), m_inCity(inCity), m_maxspeed(maxspeed) + SpeedParams(bool forward, bool inCity, Maxspeed maxspeed) + : m_forward(forward), m_inCity(inCity), m_maxspeed(std::move(maxspeed)) { }