From 58973a21a30bf95427fd43c456e41e35c386218c Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 15 Jun 2012 18:52:16 +0000 Subject: another portion of "#ifsef Unicode" removal git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Boltun/actionQueue.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/Boltun/actionQueue.cpp') diff --git a/plugins/Boltun/actionQueue.cpp b/plugins/Boltun/actionQueue.cpp index b627d8abc4..c464c92f39 100644 --- a/plugins/Boltun/actionQueue.cpp +++ b/plugins/Boltun/actionQueue.cpp @@ -95,7 +95,7 @@ static bool NotifyTyping(HANDLE hContact) static char *MsgServiceName(HANDLE hContact) { -#ifdef _UNICODE + char szServiceName[100]; char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0); if (szProto == NULL) @@ -104,7 +104,7 @@ static char *MsgServiceName(HANDLE hContact) mir_snprintf(szServiceName, sizeof(szServiceName), "%s%sW", szProto, PSS_MESSAGE); if (ServiceExists(szServiceName)) return PSS_MESSAGE "W"; -#endif + return PSS_MESSAGE; } @@ -114,7 +114,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) int size = (int)info->Answer.length() + 1; int bufsize = size; char* msg; -#ifdef UNICODE + bufsize *= sizeof(TCHAR) + 1; msg = new char[bufsize]; //msg[size - 1] = '\0'; @@ -123,9 +123,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) NULL, NULL)) FillMemory(msg, size - 1, '-'); //In case of fault return "----" in ANSI part CopyMemory(msg + size, info->Answer.c_str(), size * 2); -#else - msg = respItem->szMes; -#endif + CallContactService(hContact, MsgServiceName(hContact), PREF_TCHAR, (LPARAM)msg); @@ -142,9 +140,9 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&ldbei); bot->AnswerGiven(hContact, *info); delete info; -#ifdef UNICODE + delete msg; -#endif + typingContactsLock.Enter(); typingContacts.erase(hContact); typingContactsLock.Leave(); -- cgit v1.2.3