From 5756772ef9e9fd5b4a730d8a16737996cbec55f5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Jul 2013 20:30:07 +0000 Subject: less cycles, simplier code git-svn-id: http://svn.miranda-ng.org/main/trunk@5434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_svc.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'protocols/JabberG/src/jabber_svc.cpp') diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index a162a5349c..c8a3bedb96 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -397,14 +397,7 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText(WPARAM wParam, LPARAM lPara if (item == NULL) return 0; //no room found - JABBER_RESOURCE_STATUS * info = NULL; - for (int i=0; i < item->resourceCount; i++) { - JABBER_RESOURCE_STATUS& p = item->pResources[i]; - if ( !lstrcmp(p.resourceName, (TCHAR*)lParam)) { - info = &p; - break; - } } - + JABBER_RESOURCE_STATUS *info = item->findResource((TCHAR*)lParam); if (info == NULL) return 0; //no info found @@ -423,9 +416,8 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText(WPARAM wParam, LPARAM lPara //JID: if (_tcschr(info->resourceName, _T('@')) != NULL) appendString(bIsTipper, _T("JID:"), info->resourceName, outBuf, SIZEOF(outBuf)); - else if (lParam) { //or simple nick + else if (lParam) //or simple nick appendString(bIsTipper, _T("Nick:"), (TCHAR*) lParam, outBuf, SIZEOF(outBuf)); - } // status if (info->status >= ID_STATUS_OFFLINE && info->status <= ID_STATUS_IDLE ) -- cgit v1.2.3