diff options
author | vng <viktor.govako@gmail.com> | 2011-10-17 22:34:09 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:26:15 +0300 |
commit | a1d59a2e67ad09446b05d309a2d0697c953ad324 (patch) | |
tree | 9781a8f849d876a4f98a6cb74f4ace48aeb801da /indexer/mwm_set.cpp | |
parent | ee9b58aa115c02d0a532a3e2c0e3c1989116fd88 (diff) |
Add RemoveIfKeepValid algorithm and fix bug with countries delete.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r-- | indexer/mwm_set.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp index 43f9e6b739..b092b6cd09 100644 --- a/indexer/mwm_set.cpp +++ b/indexer/mwm_set.cpp @@ -2,10 +2,12 @@ #include "../base/logging.hpp" #include "../base/macros.hpp" +#include "../base/stl_add.hpp" #include "../std/algorithm.hpp" #include "../std/memcpy.hpp" + namespace { struct MwmIdIsEqualTo @@ -133,7 +135,7 @@ void MwmSet::Remove(string const & fileName) m_name[id].clear(); // Update the cache. - ClearCacheImpl(remove_if(m_cache.begin(), m_cache.end(), MwmIdIsEqualTo(id)), m_cache.end()); + ClearCacheImpl(RemoveIfKeepValid(m_cache.begin(), m_cache.end(), MwmIdIsEqualTo(id)), m_cache.end()); } } |