diff options
author | vng <viktor.govako@gmail.com> | 2014-11-05 02:56:55 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:32:16 +0300 |
commit | dfb1644047eee71484007806b53457ed4f4f03ff (patch) | |
tree | 4a4b9df86b67ab8f591238feeff8f285a7ae864c /indexer/feature_covering.cpp | |
parent | 39818e3e081419e1307017bf90acc9a886eb64b8 (diff) |
Minor refaŃtoring: removed CoordPointT typedef to avoid disambiguate.
Diffstat (limited to 'indexer/feature_covering.cpp')
-rw-r--r-- | indexer/feature_covering.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/indexer/feature_covering.cpp b/indexer/feature_covering.cpp index dbdba94730..7aa3fb4307 100644 --- a/indexer/feature_covering.cpp +++ b/indexer/feature_covering.cpp @@ -6,13 +6,9 @@ #include "../geometry/covering_utils.hpp" -#include "../base/base.hpp" -#include "../base/stl_add.hpp" - -#include "../std/algorithm.hpp" -#include "../std/bind.hpp" #include "../std/vector.hpp" + namespace { @@ -98,23 +94,22 @@ public: typedef CellIdConverter<MercatorBounds, RectId> CellIdConverterType; - m2::PointD ConvertPoint(double x, double y) + m2::PointD ConvertPoint(m2::PointD const & p) { - m2::PointD pt(CellIdConverterType::XToCellIdX(x), CellIdConverterType::YToCellIdY(y)); + m2::PointD const pt(CellIdConverterType::XToCellIdX(p.x), + CellIdConverterType::YToCellIdY(p.y)); m_rect.Add(pt); return pt; } - void operator() (pair<double, double> const & pt) + void operator() (m2::PointD const & pt) { - m_polyline.push_back(ConvertPoint(pt.first, pt.second)); + m_polyline.push_back(ConvertPoint(pt)); } void operator() (m2::PointD const & a, m2::PointD const & b, m2::PointD const & c) { - m_trg.push_back(Trg(ConvertPoint(a.x, a.y), - ConvertPoint(b.x, b.y), - ConvertPoint(c.x, c.y))); + m_trg.emplace_back(ConvertPoint(a), ConvertPoint(b), ConvertPoint(c)); } }; |