From 18448e7014c32235db05465f1bf76b30f9954029 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jan 2014 23:33:35 +0000 Subject: GCDEST::pszModule and GCDEST::ptszID must be constant git-svn-id: http://svn.miranda-ng.org/main/trunk@7586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/chat.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'protocols/FacebookRM/src') diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 5315294fe7..b002768851 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -30,7 +30,7 @@ void FacebookProto::UpdateChat(const TCHAR *tchat_id, const char *id, const char ptrT tnick( mir_a2t_cp(name,CP_UTF8)); ptrT ttext( mir_a2t_cp(message,CP_UTF8)); - GCDEST gcd = { m_szModuleName, (TCHAR*)tchat_id, GC_EVENT_MESSAGE }; + GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; gce.ptszText = ttext; gce.time = timestamp ? timestamp : ::time(NULL); @@ -146,7 +146,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const ptrT tnick( mir_a2t_cp(name, CP_UTF8)); ptrT tid( mir_a2t(id)); - GCDEST gcd = { m_szModuleName, (TCHAR *)tchat_id, GC_EVENT_JOIN }; + GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_JOIN }; GCEVENT gce = { sizeof(gce), &gcd }; gce.pDest = &gcd; gce.dwFlags = GCEF_ADDTOLOG; @@ -176,7 +176,7 @@ void FacebookProto::RemoveChatContact(const TCHAR *tchat_id, const char *id) ptrT tid( mir_a2t(id)); - GCDEST gcd = { m_szModuleName, (TCHAR *)tchat_id, GC_EVENT_PART }; + GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_PART }; GCEVENT gce = { sizeof(gce), &gcd }; gce.dwFlags = GCEF_ADDTOLOG; gce.ptszUID = gce.ptszNick = tid; @@ -222,7 +222,7 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname) CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw); // Send setting events - GCDEST gcd = { m_szModuleName, (TCHAR*)tid, GC_EVENT_ADDGROUP }; + GCDEST gcd = { m_szModuleName, tid, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; // Create a user statuses @@ -271,7 +271,7 @@ INT_PTR FacebookProto::OnJoinChat(WPARAM wParam,LPARAM suppress) return 0; // Create a group - GCDEST gcd = { m_szModuleName, (TCHAR*)m_tszUserName, GC_EVENT_ADDGROUP }; + GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; gce.ptszStatus = _T("Admin"); CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast(&gce)); @@ -302,10 +302,7 @@ INT_PTR FacebookProto::OnLeaveChat(WPARAM,LPARAM) /* void FacebookProto::SetChatStatus(int status) { - GCDEST gcd = { m_szModuleName }; - gcd.ptszID = const_cast(m_tszUserName); - gcd.iType = GC_EVENT_CONTROL; - + GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; gce.time = ::time(NULL); -- cgit v1.2.3