summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_links.cpp
diff options
context:
space:
mode:
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) {