summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_privacy.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:36:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit6e96535fdbb886dcad1a3396659b368283922e64 (patch)
treeef1a35a5ca0c43fcf10a1190a47853588e90cddc /protocols/JabberG/src/jabber_privacy.cpp
parentfd23a292afc4aa760a0ff8ab646eebe5942fb06d (diff)
Jabber: C++'11 iterators
Diffstat (limited to 'protocols/JabberG/src/jabber_privacy.cpp')
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index f189e90b17..4e37896abd 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -651,9 +651,9 @@ protected:
TCLCInfo(): newJids(1, TJidData::cmp), bChanged(false), pList(nullptr) {}
~TCLCInfo()
{
- for (int i=0; i < newJids.getCount(); i++) {
- mir_free(newJids[i]->jid);
- mir_free(newJids[i]);
+ for (auto &it : newJids) {
+ mir_free(it->jid);
+ mir_free(it);
}
}
@@ -1367,8 +1367,8 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList)
CListResetIcons(hwndList, hItem, bHideIcons);
}
- for (int iJid = 0; iJid < clc_info.newJids.getCount(); ++iJid)
- CListResetIcons(hwndList, clc_info.newJids[iJid]->hItem, bHideIcons);
+ for (auto &it : clc_info.newJids)
+ CListResetIcons(hwndList, it->hItem, bHideIcons);
if (!pList)
goto lbl_return;
@@ -1449,9 +1449,9 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList)
pList->RemoveAllRules();
- for (int iJid = 0; iJid < clc_info.newJids.getCount(); ++iJid) {
- hItem = clc_info.newJids[iJid]->hItem;
- szJid = clc_info.newJids[iJid]->jid;
+ for (auto &it : clc_info.newJids) {
+ hItem = it->hItem;
+ szJid = it->jid;
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Jid, szJid, TRUE, dwOrder++, dwPackets);
@@ -2111,8 +2111,8 @@ void CJabberProto::BuildPrivacyMenu()
void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld)
{
if (bDeleteOld)
- for (int i = 0; i < m_hPrivacyMenuItems.getCount(); i++)
- Menu_RemoveItem((HGENMENU)m_hPrivacyMenuItems[i]);
+ for (auto &it : m_hPrivacyMenuItems)
+ Menu_RemoveItem((HGENMENU)it);
m_hPrivacyMenuItems.destroy();