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:
authorAlex Zolotarev <alex@maps.me>2016-01-04 15:49:26 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:04:17 +0300
commit075913c187213e007722e3bd451f5cdcae454dbe (patch)
tree6ba2f68ccbd1f19e8fb9b1838cda6fc3dcf96048 /indexer/feature.cpp
parentcb162b49b8914a6a87cfc11f4f8f69ce577ebbd6 (diff)
Renamed ambiguous FeatureType::ParseAll() to ParseGeometryAndTriangles().
Diffstat (limited to 'indexer/feature.cpp')
-rw-r--r--indexer/feature.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/indexer/feature.cpp b/indexer/feature.cpp
index b340312568..ce890fa570 100644
--- a/indexer/feature.cpp
+++ b/indexer/feature.cpp
@@ -278,8 +278,32 @@ namespace
string FeatureType::DebugString(int scale) const
{
- return base_type::DebugString() + "; Center = " +
- DebugPrint(MercatorBounds::ToLatLon(feature::GetCenter(*this, scale)));
+ ParseGeometryAndTriangles(scale);
+
+ string s = base_type::DebugString();
+
+ switch (GetFeatureType())
+ {
+ case GEOM_POINT:
+ s += (" Center:" + DebugPrint(m_center));
+ break;
+
+ case GEOM_LINE:
+ s += " Points:";
+ Points2String(s, m_points);
+ break;
+
+ case GEOM_AREA:
+ s += " Triangles:";
+ Points2String(s, m_triangles);
+ break;
+
+ case GEOM_UNDEFINED:
+ ASSERT(false, ("Assume that we have valid feature always"));
+ break;
+ }
+
+ return s;
}
string DebugPrint(FeatureType const & ft)
@@ -289,7 +313,7 @@ string DebugPrint(FeatureType const & ft)
bool FeatureType::IsEmptyGeometry(int scale) const
{
- ParseAll(scale);
+ ParseGeometryAndTriangles(scale);
switch (GetFeatureType())
{
@@ -301,7 +325,7 @@ bool FeatureType::IsEmptyGeometry(int scale) const
m2::RectD FeatureType::GetLimitRect(int scale) const
{
- ParseAll(scale);
+ ParseGeometryAndTriangles(scale);
if (m_triangles.empty() && m_points.empty() && (GetFeatureType() != GEOM_POINT))
{
@@ -314,7 +338,7 @@ m2::RectD FeatureType::GetLimitRect(int scale) const
return m_limitRect;
}
-void FeatureType::ParseAll(int scale) const
+void FeatureType::ParseGeometryAndTriangles(int scale) const
{
ParseGeometry(scale);
ParseTriangles(scale);