summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 16:58:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 16:58:05 +0000
commit98255a26483a7c70fdd700ac7c41640f709d55e4 (patch)
tree2d2079c3d491aeb416f3c50788ac9e18fedb2c97 /protocols/WhatsApp
parent33953cc6a0fab6a91af293c6838f8a46dd7922da (diff)
more fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@8082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/contacts.cpp10
-rw-r--r--protocols/WhatsApp/src/proto.cpp2
-rw-r--r--protocols/WhatsApp/src/theme.cpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp
index fb3a7bea5f..d3cf75690c 100644
--- a/protocols/WhatsApp/src/contacts.cpp
+++ b/protocols/WhatsApp/src/contacts.cpp
@@ -593,7 +593,7 @@ void WhatsAppProto::onParticipatingGroups(const std::vector<string>& paramVector
void WhatsAppProto::HandleReceiveGroups(const std::vector<string>& groups, bool isOwned)
{
HCONTACT hContact;
- map<HANDLE, bool> isMember; // at the moment, only members of owning groups are stored
+ map<HCONTACT, bool> isMember; // at the moment, only members of owning groups are stored
// This could take long time if there are many new groups which aren't
// yet stored to the database. But that should be a rare case
@@ -682,7 +682,7 @@ void __cdecl WhatsAppProto::SendCreateGroupWorker(void* data)
INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
input_box* ib = new input_box;
if (getTString(hContact, WHATSAPP_KEY_PUSH_NAME, &dbv))
@@ -698,8 +698,8 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam
ib->thread = &WhatsAppProto::SendSetGroupNameWorker;
ib->proto = this;
- HANDLE* hContactPtr = new HANDLE(hContact);
- ib->userData = (void*) hContactPtr;
+ HCONTACT *hContactPtr = new HCONTACT(hContact);
+ ib->userData = (void*)hContactPtr;
HWND hDlg = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_INPUTBOX), 0, WhatsAppInputBoxProc,
reinterpret_cast<LPARAM>(ib));
@@ -710,7 +710,7 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam
INT_PTR __cdecl WhatsAppProto::OnLeaveGroup(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
if (this->isOnline() && !getString(hContact, WHATSAPP_KEY_ID, &dbv))
{
setByte(hContact, "IsGroupMember", 0);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index fc83768621..1430969639 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -314,7 +314,7 @@ int WhatsAppProto::RequestFriendship(WPARAM wParam, LPARAM lParam)
if (wParam == NULL || isOffline())
return 0;
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
DBVARIANT dbv;
if ( !getString(hContact, WHATSAPP_KEY_ID, &dbv))
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index 3e64694ade..f76129f12d 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -56,14 +56,14 @@ static WhatsAppProto* GetInstanceByHContact(HCONTACT hContact)
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM,LPARAM)>
INT_PTR GlobalServiceParam(WPARAM wParam,LPARAM lParam, LPARAM lParam2)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam,lParam2) : 0;
}
@@ -72,7 +72,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam)
for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -104,7 +104,7 @@ void WhatsAppProto::InitContactMenus()
int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
+ HCONTACT hContact = HCONTACT(wParam);
if (hContact)
debugLogA(this->GetContactDisplayName(hContact).c_str());
else