diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
commit | e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch) | |
tree | ba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/Yahoo/src/chat.cpp | |
parent | f8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff) |
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/chat.cpp')
-rw-r--r-- | protocols/Yahoo/src/chat.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
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);
}
|