summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_links.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_links.cpp
parent6e96535fdbb886dcad1a3396659b368283922e64 (diff)
MSN: C++'11 iterators
Diffstat (limited to 'protocols/MSN/src/msn_links.cpp')
-rw-r--r--protocols/MSN/src/msn_links.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index 8cc32eaad6..efbc79408b 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -71,14 +71,14 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
if (g_Instances.getCount() == 0) return 0;
CMsnProto *proto = &g_Instances[0];
- for (int i = 0; i < g_Instances.getCount(); ++i) {
- if (g_Instances[i].m_iStatus > ID_STATUS_OFFLINE) {
- proto = &g_Instances[i];
+ for (auto &it : g_Instances)
+ if (it->m_iStatus > ID_STATUS_OFFLINE) {
+ proto = it;
break;
}
- }
- if (proto == nullptr) return 1;
-
+
+ if (proto == nullptr)
+ return 1;
/* add a contact to the list */
if (wcsnicmp(arg, L"add?", 4) == 0) {