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:
authorYury Melnichek <melnichek@gmail.com>2011-02-13 01:31:30 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:12:15 +0300
commitedfa09730e8ec3b5e930c7a1895ad4c6696d453c (patch)
tree62d910bf26183bc291dd09f110ee668cff608ae3 /map/feature_vec_model.hpp
parent479a21cb05667ba3380f818bd7614e152a495372 (diff)
Cache Index::Query in FeaturesFetcher.
Diffstat (limited to 'map/feature_vec_model.hpp')
-rw-r--r--map/feature_vec_model.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/map/feature_vec_model.hpp b/map/feature_vec_model.hpp
index f7a2a60409..bc395a157b 100644
--- a/map/feature_vec_model.hpp
+++ b/map/feature_vec_model.hpp
@@ -31,6 +31,9 @@ namespace model
index_t m_multiIndex;
+ // Cached query, which stores several caches for the index.
+ mutable index_t::Query m_multiIndexQuery;
+
public:
void InitClassificator();
@@ -43,7 +46,8 @@ namespace model
template <class ToDo>
void ForEachFeature(m2::RectD const & rect, ToDo toDo) const
{
- m_multiIndex.ForEachInViewport(toDo, rect);
+ m_multiIndexQuery.Clear();
+ m_multiIndex.ForEachInViewport(toDo, rect, m_multiIndexQuery);
// Uncomment to traverse all features (SLOW!!):
// m_multiIndex.ForEachInScale(toDo, GetScaleLevel(rect));
}