diff --git a/map/framework.cpp b/map/framework.cpp index 07a1c6b994..908c5c11a4 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -66,8 +66,6 @@ void Framework::AddMap(string const & file) //threads::MutexGuard lock(m_modelSyn); int const version = m_model.AddMap(file); - if (m_lowestMapVersion > version) - m_lowestMapVersion = version; // Now we do force delete of old (April 2011) maps. if (version == feature::DataHeader::v1) @@ -76,6 +74,11 @@ void Framework::AddMap(string const & file) RemoveMap(file); VERIFY ( my::DeleteFileX(GetPlatform().WritablePathForFile(file)), () ); } + else + { + if (m_lowestMapVersion > version) + m_lowestMapVersion = version; + } } void Framework::RemoveMap(string const & file) diff --git a/search/search_engine.cpp b/search/search_engine.cpp index aafedb49a4..db6b7cff7f 100644 --- a/search/search_engine.cpp +++ b/search/search_engine.cpp @@ -13,7 +13,6 @@ #include "../geometry/distance_on_sphere.hpp" -#include "../base/logging.hpp" #include "../base/stl_add.hpp" #include "../std/map.hpp"