Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-09-25 16:09:20 +0300
committervng <viktor.govako@gmail.com>2015-09-25 17:17:51 +0300
commitc56f4c20b946bf62831e917a695d4e6c7861fdd9 (patch)
treed98919a12647ac1d6e8365a60896aa4744ac12f4 /indexer/mwm_set.cpp
parent7629852c751575bec7f407e2aab4fa4f3c2cde8a (diff)
[mwm set] Do not create MwmHandle instantly after registering map.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r--indexer/mwm_set.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp
index e5ee51cd01..71d8bcef0e 100644
--- a/indexer/mwm_set.cpp
+++ b/indexer/mwm_set.cpp
@@ -83,7 +83,7 @@ MwmSet::MwmId MwmSet::GetMwmIdByCountryFileImpl(CountryFile const & countryFile)
return MwmId(it->second.back());
}
-pair<MwmSet::MwmHandle, MwmSet::RegResult> MwmSet::Register(LocalCountryFile const & localFile)
+pair<MwmSet::MwmId, MwmSet::RegResult> MwmSet::Register(LocalCountryFile const & localFile)
{
lock_guard<mutex> lock(m_lock);
@@ -108,26 +108,26 @@ pair<MwmSet::MwmHandle, MwmSet::RegResult> MwmSet::Register(LocalCountryFile con
LOG(LINFO, ("Updating already registered mwm:", name));
info->SetStatus(MwmInfo::STATUS_REGISTERED);
info->m_file = localFile;
- return make_pair(GetLock(id), RegResult::VersionAlreadyExists);
+ return make_pair(id, RegResult::VersionAlreadyExists);
}
LOG(LWARNING, ("Trying to add too old (", localFile.GetVersion(), ") mwm (", name,
"), current version:", info->GetVersion()));
- return make_pair(MwmHandle(), RegResult::VersionTooOld);
+ return make_pair(MwmId(), RegResult::VersionTooOld);
}
-pair<MwmSet::MwmHandle, MwmSet::RegResult> MwmSet::RegisterImpl(LocalCountryFile const & localFile)
+pair<MwmSet::MwmId, MwmSet::RegResult> MwmSet::RegisterImpl(LocalCountryFile const & localFile)
{
// This function can throw an exception for a bad mwm file.
shared_ptr<MwmInfo> info(CreateInfo(localFile));
if (!info)
- return make_pair(MwmHandle(), RegResult::UnsupportedFileFormat);
+ return make_pair(MwmId(), RegResult::UnsupportedFileFormat);
info->m_file = localFile;
info->SetStatus(MwmInfo::STATUS_REGISTERED);
m_info[localFile.GetCountryName()].push_back(info);
- return make_pair(GetLock(MwmId(info)), RegResult::Success);
+ return make_pair(MwmId(info), RegResult::Success);
}
bool MwmSet::DeregisterImpl(MwmId const & id)