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:
authorvng <viktor.govako@gmail.com>2012-02-15 22:52:45 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:34:08 +0300
commit53bcf037e7d850eb77c1bc7dfd964b31a5d43557 (patch)
treeb30d8a7015e351e20da4f17a2bfdb4ae767336b4 /indexer/classificator.cpp
parentfd4d12b7c3bea550e964f93da08160f42304e66b (diff)
[search] Do index only for visibly types in MWM. Closed #626.
Diffstat (limited to 'indexer/classificator.cpp')
-rw-r--r--indexer/classificator.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp
index 1c8f0e2145..f23823e374 100644
--- a/indexer/classificator.cpp
+++ b/indexer/classificator.cpp
@@ -444,6 +444,34 @@ bool ClassifObject::IsDrawableLike(FeatureGeoType ft) const
return false;
}
+pair<int, int> ClassifObject::GetDrawScaleRange() const
+{
+ if (!IsDrawableAny())
+ return make_pair(-1, -1);
+
+ size_t const count = m_visibility.size();
+
+ int left = -1;
+ for (int i = 0; i < count; ++i)
+ if (m_visibility[i])
+ {
+ left = i;
+ break;
+ }
+
+ ASSERT_NOT_EQUAL ( left, -1, () );
+
+ int right = left;
+ for (int i = count-1; i > left; --i)
+ if (m_visibility[i])
+ {
+ right = i;
+ break;
+ }
+
+ return make_pair(left, right);
+}
+
void Classificator::ReadClassificator(istream & s)
{
m_root.Clear();