mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-11 06:44:18 +00:00
[routing] Enable access conditional.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com> (cherry picked from commit 6a2f2662b334345dc8789e970f358cec3ed69c85)
This commit is contained in:
committed by
Konstantin Pastbin
parent
3352fc13c1
commit
ffcb694961
@@ -30,8 +30,8 @@ class IndexGraphLoaderImpl final : public IndexGraphLoader
|
||||
public:
|
||||
IndexGraphLoaderImpl(VehicleType vehicleType, bool loadAltitudes,
|
||||
shared_ptr<VehicleModelFactoryInterface> vehicleModelFactory,
|
||||
shared_ptr<EdgeEstimator> estimator, MwmDataSource & dataSource,
|
||||
RoutingOptions routingOptions = RoutingOptions())
|
||||
shared_ptr<EdgeEstimator> estimator, MwmDataSource & dataSource, RoutingOptions routingOptions,
|
||||
TimeGetterT timeGetter)
|
||||
: m_vehicleType(vehicleType)
|
||||
, m_loadAltitudes(loadAltitudes)
|
||||
, m_dataSource(dataSource)
|
||||
@@ -41,6 +41,9 @@ public:
|
||||
{
|
||||
CHECK(m_vehicleModelFactory, ());
|
||||
CHECK(m_estimator, ());
|
||||
|
||||
if (timeGetter)
|
||||
m_currentTimeGetter = std::move(timeGetter);
|
||||
}
|
||||
|
||||
// IndexGraphLoader overrides:
|
||||
@@ -249,10 +252,10 @@ bool ReadRoadPenaltyFromMwm(MwmValue const & mwmValue, VehicleType vehicleType,
|
||||
unique_ptr<IndexGraphLoader> IndexGraphLoader::Create(VehicleType vehicleType, bool loadAltitudes,
|
||||
shared_ptr<VehicleModelFactoryInterface> vehicleModelFactory,
|
||||
shared_ptr<EdgeEstimator> estimator, MwmDataSource & dataSource,
|
||||
RoutingOptions routingOptions)
|
||||
RoutingOptions routingOptions, TimeGetterT timeGetter)
|
||||
{
|
||||
return make_unique<IndexGraphLoaderImpl>(vehicleType, loadAltitudes, vehicleModelFactory, estimator, dataSource,
|
||||
routingOptions);
|
||||
routingOptions, std::move(timeGetter));
|
||||
}
|
||||
|
||||
void DeserializeIndexGraph(MwmValue const & mwmValue, VehicleType vehicleType, IndexGraph & graph)
|
||||
|
||||
Reference in New Issue
Block a user