diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-11 13:53:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-11 13:53:27 +0000 |
commit | fabb5ec61205a9a3dca6f82645f257d00a534572 (patch) | |
tree | c56ec686dde3b11cd09fa55c3406f010c62cb5aa /protocols | |
parent | 5b39a6dadf859c73d9d5891643798a616efd4322 (diff) |
forgotten to declare two remaining fields as const
git-svn-id: http://svn.miranda-ng.org/main/trunk@7591 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/chat.cpp | 4 | ||||
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/input.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/scripting.cpp | 10 | ||||
-rw-r--r-- | protocols/Omegle/src/chat.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 21 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 2 |
7 files changed, 23 insertions, 22 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index b002768851..9b4dd11a58 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -196,8 +196,8 @@ char *FacebookProto::GetChatUsers(const TCHAR *chat_id) GC_INFO gci = {0};
gci.Flags = USERS;
gci.pszModule = m_szModuleName;
- gci.pszID = (TCHAR *)chat_id;
- CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci);
+ gci.pszID = chat_id;
+ CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
debugLogA("**Chat - Users in chat %s: %s", _T2A(chat_id), gci.pszUsers);
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 18851cdbf5..603ab055c2 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -618,7 +618,7 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) S3.Delete(S3.GetLength()-1, 1);
S3.Delete(0,1);
CMString Wnd = MakeWndID( S3.c_str());
- gci.pszID = ( TCHAR* )Wnd.c_str();
+ gci.pszID = Wnd.c_str();
if ( !CallServiceSync( MS_GC_GETINFO, 0, (LPARAM)&gci ) && gci.iType == GCW_CHATROOM )
S2 = GetWord( gci.pszID, 0 );
else
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 2342aee213..bfad4eedbc 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -372,7 +372,7 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac GC_INFO gci = {0};
gci.Flags = BYID|NAME|COUNT;
gci.pszModule = m_szModuleName;
- gci.pszID = (TCHAR*)S.c_str();
+ gci.pszID = S.c_str();
if ( !CallServiceSync( MS_GC_GETINFO, 0, ( LPARAM )&gci ))
mir_sntprintf( szTemp, SIZEOF(szTemp), _T("users: %u"), gci.iCount);
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index 4152ab3a8c..5d3d13d59b 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -188,9 +188,9 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) else if (sRequest == "usercount" && !sChannel.IsEmpty()) {
CMString S = MakeWndID(sChannel.c_str());
GC_INFO gci = {0};
- gci.Flags = BYID|COUNT;
+ gci.Flags = BYID | COUNT;
gci.pszModule = m_szModuleName;
- gci.pszID = (TCHAR*)S.c_str();
+ gci.pszID = S.c_str();
if ( !CallServiceSync( MS_GC_GETINFO, 0, (LPARAM)&gci )) {
TCHAR szTemp[40];
mir_sntprintf(szTemp, 35, _T("%u"), gci.iCount);
@@ -202,7 +202,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) GC_INFO gci = {0};
gci.Flags = BYID|USERS;
gci.pszModule = m_szModuleName;
- gci.pszID = ( TCHAR* )S.c_str();
+ gci.pszID = S.c_str();
if ( !CallServiceSync( MS_GC_GETINFO, 0, (LPARAM)&gci ))
return (INT_PTR)mir_strdup( gci.pszUsers );
}
@@ -212,8 +212,8 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) if ( i >= 0 ) {
int j = 0;
while (j < i) {
- GC_INFO gci = {0};
- gci.Flags = BYINDEX|ID;
+ GC_INFO gci = { 0 };
+ gci.Flags = BYINDEX | ID;
gci.pszModule = m_szModuleName;
gci.iItem = j;
if ( !CallServiceSync( MS_GC_GETINFO, 0, ( LPARAM )&gci )) {
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index 30ba9e2192..2ab09ef2f0 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -371,8 +371,8 @@ HANDLE OmegleProto::GetChatHandle() GC_INFO gci = {0};
gci.Flags = HCONTACT;
gci.pszModule = m_szModuleName;
- gci.pszID = const_cast<TCHAR*>(m_tszUserName);
- CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci);
+ gci.pszID = m_tszUserName;
+ CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
return gci.hContact;
}
\ No newline at end of file diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index f97a44ac5a..01b62ea3ed 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -255,7 +255,7 @@ void ChatRoom::Start(const ConversationRef &conversation, bool showWindow) this->conversation.fetch();
this->conversation->SetChatRoom(this);
- GC_INFO gci = {0};
+ GC_INFO gci = { 0 };
gci.Flags = BYID | HCONTACT;
gci.pszModule = ppro->m_szModuleName;
gci.pszID = this->cid;
@@ -1207,11 +1207,13 @@ INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM) void CSkypeProto::ChatRoomInvite(HANDLE hContact)
{
- GC_INFO gci = {0};
+ ptrT chat_id(::db_get_tsa(hContact, this->m_szModuleName, "ChatRoomID"));
+
+ GC_INFO gci = { 0 };
gci.Flags = BYID | USERS | DATA;
gci.pszModule = this->m_szModuleName;
- gci.pszID = ::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID");
- if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci))
+ gci.pszID = chat_id;
+ if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci))
{
ChatRoom *room = (ChatRoom *)gci.dwItemData;
if (room != NULL && gci.pszUsers != NULL)
@@ -1225,7 +1227,6 @@ void CSkypeProto::ChatRoomInvite(HANDLE hContact) delete param;
}
}
- ::mir_free(gci.pszID);
}
void CSkypeProto::CloseAllChatSessions()
@@ -1250,7 +1251,7 @@ void CSkypeProto::CloseAllChatSessions() ChatRoom *CSkypeProto::FindChatRoom(const wchar_t *cid)
{
- GC_INFO gci = {0};
+ GC_INFO gci = { 0 };
gci.Flags = BYID | DATA;
gci.pszModule = this->m_szModuleName;
gci.pszID = (wchar_t*)cid;
@@ -1362,11 +1363,11 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam) case CHAT_LIST_MENU::ICM_CONF_INVITE:
{
- GC_INFO gci = {0};
+ GC_INFO gci = { 0 };
gci.Flags = BYID | USERS;
gci.pszModule = this->m_szModuleName;
gci.pszID = gch->pDest->ptszID;
- if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci) && gci.pszUsers != NULL)
+ if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.pszUsers != NULL)
{
StringList invitedContacts(_A2T(gci.pszUsers));
ChatRoomParam *param = new ChatRoomParam(NULL, invitedContacts, this);
@@ -1502,7 +1503,7 @@ void CSkypeProto::UpdateChatUserStatus(const ContactRef &contact) contact->GetIdentity(identity);
ptrW sid(::mir_utf8decodeW(identity));
- GC_INFO gci = {0};
+ GC_INFO gci = { 0 };
gci.Flags = BYINDEX | DATA;
gci.pszModule = this->m_szModuleName;
@@ -1531,7 +1532,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact) ptrW nick(::mir_utf8decodeW(((CContact::Ref)contact)->GetNick()));
- GC_INFO gci = {0};
+ GC_INFO gci = { 0 };
gci.Flags = BYINDEX | DATA;
gci.pszModule = this->m_szModuleName;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 4fac52e913..cfe4753272 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -53,7 +53,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) GC_INFO gci = { 0 };
gci.pszModule = m_szModuleName;
- gci.pszID = sid.GetBuffer();
+ gci.pszID = sid;
gci.Flags = BYID | HCONTACT;
CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci);
c->m_hContact = gci.hContact;
|