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>2015-11-18 11:23:13 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:03:52 +0300
commit8f4f450aec9c8f2ee5a81d75c657a11e069c8a5d (patch)
tree86752c0ed84113a1048fd591700ca159db8fa673 /indexer/index.cpp
parent2eb1db0912e600f64730891f7868942820e85d52 (diff)
Edited features support in the Index.
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r--indexer/index.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp
index cf03bfce3f..17a0c426e2 100644
--- a/indexer/index.cpp
+++ b/indexer/index.cpp
@@ -119,6 +119,11 @@ bool Index::FeaturesLoaderGuard::IsWorld() const
void Index::FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index, FeatureType & ft) const
{
- m_vector.GetByIndex(index, ft);
- ft.SetID(FeatureID(m_handle.GetId(), index));
+ FeatureID const fid(m_handle.GetId(), index);
+ ASSERT(!m_editor.IsFeatureDeleted(fid), ("Deleted feature was cached. Please review your code."));
+ if (!m_editor.Instance().GetEditedFeature(fid, ft))
+ {
+ m_vector.GetByIndex(index, ft);
+ ft.SetID(fid);
+ }
}