diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 02fc077c4f..9e0c556ba1 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -1067,11 +1067,10 @@ CJabberProto* JabberChooseInstance(bool bIsLink) return it;
int nItems = 0, lastItemId = 0;
- for (int i = 0; i < g_Instances.getCount(); i++) {
- CJabberProto *ppro = g_Instances[i];
+ for (auto &ppro : g_Instances) {
if (ppro->m_iStatus != ID_STATUS_OFFLINE && ppro->m_iStatus != ID_STATUS_CONNECTING) {
++nItems;
- lastItemId = i + 1;
+ lastItemId = g_Instances.indexOf(&ppro) + 1;
Menu_ModifyItem(ppro->m_hChooseMenuItem, nullptr, Skin_LoadProtoIcon(ppro->m_szModuleName, ppro->m_iStatus));
}
else Menu_ShowItem(ppro->m_hChooseMenuItem, false);
|