From 98255a26483a7c70fdd700ac7c41640f709d55e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 16:58:05 +0000 Subject: more fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/contacts.cpp | 10 +++++----- protocols/WhatsApp/src/proto.cpp | 2 +- protocols/WhatsApp/src/theme.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'protocols/WhatsApp') 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& paramVector void WhatsAppProto::HandleReceiveGroups(const std::vector& groups, bool isOwned) { HCONTACT hContact; - map isMember; // at the moment, only members of owning groups are stored + map 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(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(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(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(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 GlobalService(WPARAM wParam,LPARAM lParam) { - WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast(wParam)); + WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam)); return proto ? (proto->*Fcn)(wParam,lParam) : 0; } template INT_PTR GlobalServiceParam(WPARAM wParam,LPARAM lParam, LPARAM lParam2) { - WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast(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(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(wParam); + HCONTACT hContact = HCONTACT(wParam); if (hContact) debugLogA(this->GetContactDisplayName(hContact).c_str()); else -- cgit v1.2.3