summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_menu.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:36:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commite8f69d4e566a3e73ff656beebcae9916e9148589 (patch)
tree1609c337a76dd79d198fecfdfa5d3acfbd2c45cf /protocols/MSN/src/msn_menu.cpp
parent6e96535fdbb886dcad1a3396659b368283922e64 (diff)
MSN: C++'11 iterators
Diffstat (limited to 'protocols/MSN/src/msn_menu.cpp')
-rw-r--r--protocols/MSN/src/msn_menu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 9112c3fec0..65807adcc6 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -192,9 +192,9 @@ static CMsnProto* GetProtoInstanceByHContact(MCONTACT hContact)
if (szProto == nullptr)
return nullptr;
- for (int i = 0; i < g_Instances.getCount(); i++)
- if (!mir_strcmp(szProto, g_Instances[i].m_szModuleName))
- return &g_Instances[i];
+ for (auto &it : g_Instances)
+ if (!mir_strcmp(szProto, it->m_szModuleName))
+ return it;
return nullptr;
}