Set Framework::m_lowestMapsVersion only for version >= v2.

This commit is contained in:
vng 2013-02-25 20:00:13 +03:00 committed by Alex Zolotarev
parent 3124974e98
commit 3034891159
2 changed files with 5 additions and 3 deletions

View file

@ -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)

View file

@ -13,7 +13,6 @@
#include "../geometry/distance_on_sphere.hpp"
#include "../base/logging.hpp"
#include "../base/stl_add.hpp"
#include "../std/map.hpp"