From 483d89db3f2a722fdb993a866f8c1f910aa0e8fb Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Wed, 8 Jun 2016 13:21:21 +0300 Subject: [PATCH] [editor] Fix warning --- indexer/osm_editor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index e7c21dc6a2..3de6497b13 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -907,9 +907,11 @@ void Editor::Invalidate() void Editor::MarkFeatureAsObsolete(FeatureID const & fid) { auto const featureStatus = GetFeatureStatus(fid); - ASSERT(featureStatus == FeatureStatus::Untouched || - featureStatus == FeatureStatus::Modified, - ("Only untouched and modified features can be made obsolete")); + if (featureStatus != FeatureStatus::Untouched && featureStatus != FeatureStatus::Modified) + { + ASSERT(false, ("Only untouched and modified features can be made obsolete")); + return; + } auto & fti = m_features[fid.m_mwmId][fid.m_index]; // If a feature was modified we can drop all changes since it's now obsolete.