summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/contactcache.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:35:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit429c0d0524e7197a593209468fef530344f5ee05 (patch)
tree71df95fdf71c52a956de69b6f31f3a6528053442 /plugins/TabSRMM/src/contactcache.cpp
parent5b6db3290cb9c9817cba126bd7aea798a610c31d (diff)
tabsrmm: C++'11 iterators
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index d1e60c8eb0..86e2066837 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -467,20 +467,19 @@ CContactCache* CContactCache::getContactCache(MCONTACT hContact)
int CContactCache::cacheUpdateMetaChanged(WPARAM bMetaEnabled, LPARAM)
{
- for (int i = 0; i < arContacts.getCount(); i++) {
- CContactCache &c = arContacts[i];
- if (c.isMeta() && !bMetaEnabled) {
- c.closeWindow();
- c.resetMeta();
+ for (auto &c : arContacts) {
+ if (c->isMeta() && !bMetaEnabled) {
+ c->closeWindow();
+ c->resetMeta();
}
// meta contacts are enabled, but current contact is a subcontact - > close window
- if (bMetaEnabled && c.isSubContact())
- c.closeWindow();
+ if (bMetaEnabled && c->isSubContact())
+ c->closeWindow();
// reset meta contact information, if metacontacts protocol became avail
- if (bMetaEnabled && !c.cc->IsMeta())
- c.resetMeta();
+ if (bMetaEnabled && !c->cc->IsMeta())
+ c->resetMeta();
}
return 0;
}