diff options
author | Maxim Pimenov <m@maps.me> | 2018-11-26 16:44:37 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2018-11-26 19:11:42 +0300 |
commit | 356ac180326847a73985d69938e7baaef02882c1 (patch) | |
tree | cd81c771122a799b1c982bc28d7dd8b87d2aad4a /indexer | |
parent | 9744c0c04170b07bc848611b8cca7358d3f057bb (diff) |
[coding] Removed the CellId epsilon.
In was used as eps in meters in some cases and eps in mercator in others.
Its value was hard to justify and so were its use cases. We're better off
with less epsilons for now.
Also renamed Metres to Meters in the mercator code.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/data_source_helpers.cpp | 2 | ||||
-rw-r--r-- | indexer/feature_covering.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indexer/data_source_helpers.cpp b/indexer/data_source_helpers.cpp index 65945e41d3..e805280f89 100644 --- a/indexer/data_source_helpers.cpp +++ b/indexer/data_source_helpers.cpp @@ -33,7 +33,7 @@ void ForEachFeatureAtPoint(DataSource const & dataSource, function<void(FeatureT auto limitRect = ft.GetLimitRect(kScale); // Be a little more tolerant. When used by editor mercator is given // with some error, so we must extend limit rect a bit. - limitRect.Inflate(kCellIdToPointEps, kCellIdToPointEps); + limitRect.Inflate(kMwmPointAccuracy, kMwmPointAccuracy); if (limitRect.IsPointInside(mercator) && feature::GetMinDistanceMeters(ft, mercator) <= toleranceInMeters) { diff --git a/indexer/feature_covering.hpp b/indexer/feature_covering.hpp index 81336567fc..3a852dc877 100644 --- a/indexer/feature_covering.hpp +++ b/indexer/feature_covering.hpp @@ -43,7 +43,7 @@ void SortAndMergeIntervals(Intervals v, Intervals & res); template <int DEPTH_LEVELS> m2::CellId<DEPTH_LEVELS> GetRectIdAsIs(m2::RectD const & r) { - double const eps = kCellIdToPointEps; + double const eps = kMwmPointAccuracy; using Converter = CellIdConverter<MercatorBounds, m2::CellId<DEPTH_LEVELS>>; return Converter::Cover2PointsWithCell( |