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-07-17 17:27:55 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:57:15 +0300
commit5399343271ccb738d2624fb25250ba3e9694e21c (patch)
tree164387f96c2c8a2b8d6e704fe3d74db2d2d8560f /indexer/mwm_set.cpp
parent6b9892d72ad0bbe54a7a7f7ef7664e517c8d54fc (diff)
Review fixes.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r--indexer/mwm_set.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp
index 389354f314..3ced9905c6 100644
--- a/indexer/mwm_set.cpp
+++ b/indexer/mwm_set.cpp
@@ -291,24 +291,14 @@ void MwmSet::ClearCacheImpl(CacheType::iterator beg, CacheType::iterator end)
m_cache.erase(beg, end);
}
-namespace
-{
- struct MwmIdIsEqualTo
- {
- MwmSet::MwmId m_id;
-
- explicit MwmIdIsEqualTo(MwmSet::MwmId const & id) : m_id(id) {}
-
- bool operator()(pair<MwmSet::MwmId, MwmSet::TMwmValueBasePtr> const & p) const
- {
- return p.first == m_id;
- }
- };
-}
-
void MwmSet::ClearCache(MwmId const & id)
{
- ClearCacheImpl(RemoveIfKeepValid(m_cache.begin(), m_cache.end(), MwmIdIsEqualTo(id)), m_cache.end());
+ ClearCacheImpl(RemoveIfKeepValid(m_cache.begin(), m_cache.end(),
+ [&id] (pair<MwmSet::MwmId, MwmSet::TMwmValueBasePtr> const & p)
+ {
+ return (p.first == id);
+ }),
+ m_cache.end());
}
string DebugPrint(MwmSet::RegResult result)
@@ -324,6 +314,6 @@ string DebugPrint(MwmSet::RegResult result)
case MwmSet::RegResult::BadFile:
return "BadFile";
case MwmSet::RegResult::UnsupportedFileFormat:
- return "UnsupportedFileFormat";
+ return "UnsupportedFileFormat";
}
}