diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-30 07:12:14 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-30 07:12:14 +0000 |
commit | 4487feacf1085175460ff011aa28fcfb4a15995a (patch) | |
tree | c3d6a6b9a1ec856ecc592d59c78ffa5a81006e46 /plugins/MessageState | |
parent | a46baf1a0315e63a3e08b2272622831194cf7b11 (diff) |
MessageState: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@15112 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MessageState')
-rw-r--r-- | plugins/MessageState/src/messagestate.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp index bdb80a7eba..d7ddd12d32 100644 --- a/plugins/MessageState/src/messagestate.cpp +++ b/plugins/MessageState/src/messagestate.cpp @@ -12,12 +12,8 @@ LONGLONG GetLastSentMessageTime(MCONTACT hContact) return -1;
}
-bool CheckProtoSupport(const char *szProto)
-{
- if (szProto == NULL) return false;
-
- DWORD caps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
- return FLAG_CONTAINS(caps, PF4_READNOTIFY);
+__forceinline bool CheckProtoSupport(const char *szProto)
+{ return ((szProto != NULL) ? FLAG_CONTAINS(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0), PF4_READNOTIFY) : false);
}
void SetSRMMIcon(MCONTACT hContact, SRMM_ICON_TYPE type, time_t time = 0)
@@ -127,7 +123,7 @@ int OnSrmmWindowEvent(WPARAM, LPARAM lParam) return 0;
if (event->uType == MSG_WINDOW_EVT_OPEN) {
- char *szProto = GetContactProto(event->hContact);
+ const char *szProto = GetContactProto(event->hContact);
if (CheckProtoSupport(szProto))
{
arMonitoredWindows.insert((HANDLE)event->hContact);
|