From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/src/chat.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'protocols/Yahoo/src/chat.cpp') diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 39e584b655..6cb48c658e 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -289,11 +289,9 @@ int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam) case GC_USER_MESSAGE: if (gch->ptszText && gch->ptszText[0]) { - char* msg = mir_utf8encodeT(gch->ptszText); ChatRoom *cm = m_chatrooms.find((ChatRoom*)&room); if (cm) - yahoo_conference_message(m_id, NULL, cm->members, room, msg, 1); - mir_free(msg); + yahoo_conference_message(m_id, NULL, cm->members, room, T2Utf(gch->ptszText), 1); } break; @@ -435,17 +433,13 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, c if (root && who) { - char *msg8 = mir_utf8encodeT(msg); + T2Utf msg8(msg); CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room); - if (cm) - { + if (cm) { for (YList *l = who; l; l = l->next) yahoo_conference_addinvite(ppro->m_id, NULL, (char*)l->data, room, cm->members, msg8); } - else - yahoo_conference_invite(ppro->m_id, NULL, who, room, msg8); - - mir_free(msg8); + else yahoo_conference_invite(ppro->m_id, NULL, who, room, msg8); for (YList *l = who; l; l = l->next) mir_free(l->data); y_list_free(who); @@ -630,9 +624,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM { TCHAR msg[1024]; GetDlgItemText(hwndDlg, IDC_MSG2, msg, SIZEOF(msg)); - char *msg8 = mir_utf8encodeT(msg); - yahoo_conference_decline(param->ppro->m_id, NULL, cm->members, param->room, msg8); - mir_free(msg8); + yahoo_conference_decline(param->ppro->m_id, NULL, cm->members, param->room, T2Utf(msg)); param->ppro->m_chatrooms.remove((CYahooProto::ChatRoom*)¶m->room); } -- cgit v1.2.3