diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2018-06-26 10:51:37 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-06-27 19:20:52 +0300 |
commit | 570b2b0b35df1fad001460eccf35da31e334b8b0 (patch) | |
tree | 2f805cf3122db499b794248f3f6c1bdd232b258c /track_analyzing | |
parent | dd7186b48be4636c1e67d223817a47f3f3a026e9 (diff) |
[indexer] DataSource refactoring
Diffstat (limited to 'track_analyzing')
-rw-r--r-- | track_analyzing/track_matcher.cpp | 7 | ||||
-rw-r--r-- | track_analyzing/track_matcher.hpp | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/track_analyzing/track_matcher.cpp b/track_analyzing/track_matcher.cpp index dffa3c2fcb..310e9b1ccb 100644 --- a/track_analyzing/track_matcher.cpp +++ b/track_analyzing/track_matcher.cpp @@ -54,7 +54,8 @@ namespace track_analyzing // TrackMatcher ------------------------------------------------------------------------------------ TrackMatcher::TrackMatcher(storage::Storage const & storage, NumMwmId mwmId, platform::CountryFile const & countryFile) - : m_mwmId(mwmId) + : m_dataSource(make_unique<FeatureSourceFactory>()) + , m_mwmId(mwmId) , m_vehicleModel(CarModelFactory({}).GetVehicleModelForCountry(countryFile.GetName())) { auto localCountryFile = storage.GetLatestLocalFile(countryFile); @@ -132,8 +133,8 @@ TrackMatcher::Step::Step(DataPoint const & dataPoint) } void TrackMatcher::Step::FillCandidatesWithNearbySegments( - DataSourceBase const & dataSource, IndexGraph const & graph, VehicleModelInterface const & vehicleModel, - NumMwmId mwmId) + DataSource const & dataSource, IndexGraph const & graph, + VehicleModelInterface const & vehicleModel, NumMwmId mwmId) { dataSource.ForEachInRect( [&](FeatureType const & ft) { diff --git a/track_analyzing/track_matcher.hpp b/track_analyzing/track_matcher.hpp index de386bb765..7563321537 100644 --- a/track_analyzing/track_matcher.hpp +++ b/track_analyzing/track_matcher.hpp @@ -57,7 +57,8 @@ private: DataPoint const & GetDataPoint() const { return m_dataPoint; } routing::Segment const & GetSegment() const { return m_segment; } bool HasCandidates() const { return !m_candidates.empty(); } - void FillCandidatesWithNearbySegments(DataSourceBase const & dataSource, routing::IndexGraph const & graph, + void FillCandidatesWithNearbySegments(DataSource const & dataSource, + routing::IndexGraph const & graph, routing::VehicleModelInterface const & vehicleModel, routing::NumMwmId mwmId); void FillCandidates(Step const & previousStep, routing::IndexGraph & graph); |