diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch) | |
tree | 247eed13a5231c3983e343f0b7fc2a95012353c2 /protocols/Gadu-Gadu/src/links.cpp | |
parent | 9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff) |
all another C++'11 iterators
Diffstat (limited to 'protocols/Gadu-Gadu/src/links.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/links.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 02e4986236..295e9dbcf2 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -60,15 +60,13 @@ static INT_PTR gg_parselink(WPARAM, LPARAM lParam) GaduProto *gg = nullptr;
int items = 0;
- for (int i = 0; i < g_Instances.getCount(); i++) {
- gg = g_Instances[i];
-
- if (gg->m_iStatus > ID_STATUS_OFFLINE) {
+ for (auto &it : g_Instances) {
+ gg = it;
+ if (it->m_iStatus > ID_STATUS_OFFLINE) {
++items;
- Menu_ModifyItem(gg->hInstanceMenuItem, nullptr, Skin_LoadProtoIcon(gg->m_szModuleName, gg->m_iStatus));
+ Menu_ModifyItem(it->hInstanceMenuItem, nullptr, Skin_LoadProtoIcon(it->m_szModuleName, it->m_iStatus));
}
- else
- Menu_ShowItem(gg->hInstanceMenuItem, false);
+ else Menu_ShowItem(it->hInstanceMenuItem, false);
}
if (items > 1) {
|