summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-20 20:30:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-20 20:30:07 +0000
commit5756772ef9e9fd5b4a730d8a16737996cbec55f5 (patch)
treeb154b3f9e56ceb86b3385d0f59d7341f5ac9b71e /protocols/JabberG/src/jabber_proto.cpp
parent2a60812b64635ecd655131217f9cb0fa077575dc (diff)
less cycles, simplier code
git-svn-id: http://svn.miranda-ng.org/main/trunk@5434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 9df6932cf8..da49fcbf66 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -728,19 +728,13 @@ int __cdecl CJabberProto::GetInfo(HANDLE hContact, int /*infoType*/)
}
JABBER_LIST_ITEM *tmpItem = NULL;
if (pDelimiter && (tmpItem = ListGetItemPtr(LIST_CHATROOM, szBareJid))) {
- JABBER_RESOURCE_STATUS *him = NULL;
- for (int i=0; i < tmpItem->resourceCount; i++) {
- JABBER_RESOURCE_STATUS &p = tmpItem->pResources[i];
- if ( !lstrcmp(p.resourceName, pDelimiter))
- him = &p;
- }
+ JABBER_RESOURCE_STATUS *him = tmpItem->findResource(pDelimiter);
if (him) {
item = ListAdd(LIST_VCARD_TEMP, jid);
ListAddResource(LIST_VCARD_TEMP, jid, him->status, him->statusMessage, him->priority);
}
}
- else
- item = ListAdd(LIST_VCARD_TEMP, jid);
+ else item = ListAdd(LIST_VCARD_TEMP, jid);
}
if (item && item->pResources) {