diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-11-16 22:58:36 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:28:12 +0300 |
commit | b10bb9d02496f94441921324485019948d8a0280 (patch) | |
tree | fba59647b48d4643b51a9f3d0326f4889f2a6589 /indexer/mwm_set.cpp | |
parent | 0dc4bf42ce68170855392b97589586231cf00e5d (diff) |
Added Framework::GetLowestMapVersion() for correct iOS upgrade support
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r-- | indexer/mwm_set.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp index 7e87f77627..10b946e298 100644 --- a/indexer/mwm_set.cpp +++ b/indexer/mwm_set.cpp @@ -108,7 +108,7 @@ string MwmSet::MwmLock::GetCountryName() const return src.substr(0, src.size() - strlen(DATA_FILE_EXTENSION)); } -bool MwmSet::Add(string const & fileName, m2::RectD & r) +int MwmSet::Add(string const & fileName, m2::RectD & r) { threads::MutexGuard mutexGuard(m_lock); UNUSED_VALUE(mutexGuard); @@ -116,17 +116,20 @@ bool MwmSet::Add(string const & fileName, m2::RectD & r) //LOG(LINFO, ("MwmSet::Add()", fileName)); if (GetIdByName(fileName) != INVALID_MWM_ID) - return false; + { + LOG(LWARNING, ("Trying to add already added map", fileName)); + return -1; + } MwmId const id = GetFreeId(); m_name[id] = fileName; memset(&m_info[id], 0, sizeof(MwmInfo)); - GetInfo(fileName, m_info[id]); + int const version = GetInfo(fileName, m_info[id]); m_info[id].m_lockCount = 0; m_info[id].m_status = MwmInfo::STATUS_ACTIVE; r = m_info[id].m_limitRect; - return true; + return version; } void MwmSet::Remove(string const & fileName) |