diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-20 20:30:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-20 20:30:07 +0000 |
commit | 5756772ef9e9fd5b4a730d8a16737996cbec55f5 (patch) | |
tree | b154b3f9e56ceb86b3385d0f59d7341f5ac9b71e /protocols/JabberG/src/jabber_svc.cpp | |
parent | 2a60812b64635ecd655131217f9cb0fa077575dc (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_svc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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 )
|