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:
authorSergey Magidovich <mgsergio@mapswithme.com>2015-12-30 13:01:04 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:04:19 +0300
commit07dd52fb77e88966ce51a14dc38cddfb9cd077bf (patch)
tree0ee6db2368ae72f63b56375905fe8251fbc0658a /indexer/index.cpp
parent7d7e810d5aef61242e9dfa27dbd527f457894a46 (diff)
enum FeatureStatus -> enum class FeatureStatus
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r--indexer/index.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp
index 33d55bb8c5..c004d14288 100644
--- a/indexer/index.cpp
+++ b/indexer/index.cpp
@@ -120,11 +120,17 @@ bool Index::FeaturesLoaderGuard::IsWorld() const
void Index::FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index, FeatureType & ft) const
{
MwmId const & id = m_handle.GetId();
- ASSERT_NOT_EQUAL(osm::Editor::EDeleted, m_editor.GetFeatureStatus(id, index),
+ 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."));
- if (!m_editor.Instance().GetEditedFeature(id, index, ft))
- {
- m_vector.GetByIndex(index, ft);
- ft.SetID(FeatureID(id, index));
- }
+ m_vector.GetByIndex(index, ft);
+ ft.SetID(FeatureID(id, index));
}