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:
authortatiana-yan <tatiana.kondakova@gmail.com>2018-07-24 13:28:42 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-07-30 12:36:04 +0300
commitffaf23d30763c1167c9b36290eb62fde67c7291c (patch)
treee4d5c6f8026cbe65cf43b22c858b294470aeff15 /indexer/feature_algo.cpp
parentf771f419b43c67a79d786db0c2740effdbe072c6 (diff)
[indexer] Convert LoaderBase methods to const, do not store FeatureType * in shared feature loader. Remove mutable from FeatureType. Remove methods which use uninitialized FeatureType * LoaderBase::m_pFt from FeatureBase. Remove FeatureBase because noone else uses it.
Diffstat (limited to 'indexer/feature_algo.cpp')
-rw-r--r--indexer/feature_algo.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indexer/feature_algo.cpp b/indexer/feature_algo.cpp
index 25d15e9e58..d0b2ef0047 100644
--- a/indexer/feature_algo.cpp
+++ b/indexer/feature_algo.cpp
@@ -13,7 +13,7 @@ namespace feature
/// @returns point on a feature that is the closest to f.GetLimitRect().Center().
/// It is used by many ednities in the core of mapsme. Do not modify it's
/// logic if you really-really know what you are doing.
-m2::PointD GetCenter(FeatureType const & f, int scale)
+m2::PointD GetCenter(FeatureType & f, int scale)
{
EGeomType const type = f.GetFeatureType();
switch (type)
@@ -38,12 +38,9 @@ m2::PointD GetCenter(FeatureType const & f, int scale)
}
}
-m2::PointD GetCenter(FeatureType const & f)
-{
- return GetCenter(f, FeatureType::BEST_GEOMETRY);
-}
+m2::PointD GetCenter(FeatureType & f) { return GetCenter(f, FeatureType::BEST_GEOMETRY); }
-double GetMinDistanceMeters(FeatureType const & ft, m2::PointD const & pt, int scale)
+double GetMinDistanceMeters(FeatureType & ft, m2::PointD const & pt, int scale)
{
double res = numeric_limits<double>::max();
auto updateDistanceFn = [&] (m2::PointD const & p)
@@ -104,7 +101,7 @@ double GetMinDistanceMeters(FeatureType const & ft, m2::PointD const & pt, int s
return res;
}
-double GetMinDistanceMeters(FeatureType const & ft, m2::PointD const & pt)
+double GetMinDistanceMeters(FeatureType & ft, m2::PointD const & pt)
{
return GetMinDistanceMeters(ft, pt, FeatureType::BEST_GEOMETRY);
}