summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/crypt_icons.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/SecureIM/src/crypt_icons.cpp
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/SecureIM/src/crypt_icons.cpp')
-rw-r--r--plugins/SecureIM/src/crypt_icons.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp
index 59e0059773..2c7eb2fd75 100644
--- a/plugins/SecureIM/src/crypt_icons.cpp
+++ b/plugins/SecureIM/src/crypt_icons.cpp
@@ -19,9 +19,9 @@ static ICON_CACHE& getCacheItem(int mode, int type)
int m = mode & 0x0f, s = (mode & SECURED) >> 4, i; // разобрали на части - режим и состояние
HICON icon;
- for (i = 0; i < arIcoList.getCount(); i++)
- if (arIcoList[i].mode == ((type << 8) | mode))
- return arIcoList[i];
+ for (auto &it : arIcoList)
+ if (it->mode == ((type << 8) | mode))
+ return *it;
i = s;
switch (type) {
@@ -106,8 +106,8 @@ void ShowStatusIconNotify(MCONTACT hContact)
void RefreshContactListIcons(void)
{
- for (int i = 0; i < arIcoList.getCount(); i++)
- arIcoList[i].hCLIcon = nullptr;
+ for (auto &it : arIcoList)
+ it->hCLIcon = nullptr;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (isSecureProtocol(hContact))