diff options
author | vng <viktor.govako@gmail.com> | 2016-03-01 18:19:36 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:51:00 +0300 |
commit | efa92fa4b7c942c963e6fce81657bdec903e69bd (patch) | |
tree | 724a5eadb61c71eb4a221ba242246c71fc68f884 /indexer/index.hpp | |
parent | 6ff5907aaf804690fd8f9bf8a3a12c389659db4f (diff) |
Changed the check order.
Diffstat (limited to 'indexer/index.hpp')
-rw-r--r-- | indexer/index.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indexer/index.hpp b/indexer/index.hpp index 1ee8d7c8fa..526618fb9b 100644 --- a/indexer/index.hpp +++ b/indexer/index.hpp @@ -110,6 +110,9 @@ private: index.ForEachInIntervalAndScale( [&](uint32_t index) { + if (!checkUnique(index)) + return; + FeatureType feature; switch (m_editor.GetFeatureStatus(mwmID, index)) { @@ -122,12 +125,10 @@ private: CHECK(false, ("Created features index should be generated.")); case osm::Editor::FeatureStatus::Untouched: break; } - if (checkUnique(index)) - { - fv.GetByIndex(index, feature); - feature.SetID(FeatureID(mwmID, index)); - m_f(feature); - } + + fv.GetByIndex(index, feature); + feature.SetID(FeatureID(mwmID, index)); + m_f(feature); }, i.first, i.second, scale); } |