From 4487feacf1085175460ff011aa28fcfb4a15995a Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 30 Aug 2015 07:12:14 +0000 Subject: MessageState: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@15112 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MessageState/src/messagestate.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/MessageState/src/messagestate.cpp') 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); -- cgit v1.2.3