diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-01-05 14:10:08 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:04:20 +0300 |
commit | ef1e40d052042e91f5d5ed836cb3f1d656caee5d (patch) | |
tree | 87f1f5b5095ca2bfd7d5929ad3c5fbd48432aa4b /indexer/index.cpp | |
parent | ea27bce049e73817b70e6df8dc1e131a0350efe2 (diff) |
Implement serialsization for features with type other than GEOM_POINT.
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r-- | indexer/index.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp index 3eaefc7971..79f7f63398 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -120,17 +120,11 @@ bool Index::FeaturesLoaderGuard::IsWorld() const void Index::FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index, FeatureType & ft) const { MwmId const & id = m_handle.GetId(); - if (m_editor.GetFeatureStatus(id, index) == osm::Editor::FeatureStatus::Untouched) - GetFeatureByIndexIgnoringEditor(index, ft); - else - m_editor.GetEditedFeature(m_handle.GetId(), index, ft); -} - -void Index::FeaturesLoaderGuard::GetFeatureByIndexIgnoringEditor(uint32_t index, FeatureType & ft) const -{ - MwmId const & id = m_handle.GetId(); ASSERT_NOT_EQUAL(osm::Editor::FeatureStatus::Deleted, m_editor.GetFeatureStatus(id, index), ("Deleted feature was cached. Please review your code.")); - m_vector.GetByIndex(index, ft); - ft.SetID(FeatureID(id, index)); + if (!m_editor.Instance().GetEditedFeature(id, index, ft)) + { + m_vector.GetByIndex(index, ft); + ft.SetID(FeatureID(id, index)); + } } |