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:
authorYuri Gorshenin <y@maps.me>2015-07-08 15:00:30 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:45 +0300
commitfda4e3603d8bd3ce40816344afc8f0f88f3e2afd (patch)
treea23b273110780feba0ff39684582a01cd8f206fe /indexer/index.cpp
parenta64351d1e62ce58b5a4a8d768a8541c8771f294f (diff)
[index, mwm-set] MwmLock -> MwmHandle
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r--indexer/index.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp
index ef6330198c..edba96bef6 100644
--- a/indexer/index.cpp
+++ b/indexer/index.cpp
@@ -49,10 +49,10 @@ MwmSet::TMwmValueBasePtr Index::CreateValue(LocalCountryFile const & localFile)
return p;
}
-pair<MwmSet::MwmLock, bool> Index::RegisterMap(LocalCountryFile const & localFile)
+pair<MwmSet::MwmHandle, MwmSet::RegResult> Index::RegisterMap(LocalCountryFile const & localFile)
{
- pair<MwmSet::MwmLock, bool> result = Register(localFile);
- if (result.first.IsLocked() && result.second)
+ auto result = Register(localFile);
+ if (result.first.IsAlive() && result.second == MwmSet::RegResult::Success)
m_observers.ForEach(&Observer::OnMapRegistered, localFile);
return result;
}
@@ -73,26 +73,26 @@ void Index::OnMwmDeregistered(LocalCountryFile const & localFile)
//////////////////////////////////////////////////////////////////////////////////
Index::FeaturesLoaderGuard::FeaturesLoaderGuard(Index const & parent, MwmId id)
- : m_lock(const_cast<Index &>(parent), id),
+ : m_handle(const_cast<Index &>(parent), id),
/// @note This guard is suitable when mwm is loaded
- m_vector(m_lock.GetValue<MwmValue>()->m_cont, m_lock.GetValue<MwmValue>()->GetHeader())
+ m_vector(m_handle.GetValue<MwmValue>()->m_cont, m_handle.GetValue<MwmValue>()->GetHeader())
{
}
string Index::FeaturesLoaderGuard::GetCountryFileName() const
{
- if (!m_lock.IsLocked())
+ if (!m_handle.IsAlive())
return string();
- return m_lock.GetValue<MwmValue>()->GetCountryFile().GetNameWithoutExt();
+ return m_handle.GetValue<MwmValue>()->GetCountryFile().GetNameWithoutExt();
}
bool Index::FeaturesLoaderGuard::IsWorld() const
{
- return m_lock.GetValue<MwmValue>()->GetHeader().GetType() == feature::DataHeader::world;
+ return m_handle.GetValue<MwmValue>()->GetHeader().GetType() == feature::DataHeader::world;
}
void Index::FeaturesLoaderGuard::GetFeature(uint32_t offset, FeatureType & ft)
{
m_vector.Get(offset, ft);
- ft.SetID(FeatureID(m_lock.GetId(), offset));
+ ft.SetID(FeatureID(m_handle.GetId(), offset));
}