diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 21:37:41 +0000 |
commit | ee68ac82d5aabb596e8bd0f2b9286827ca2ce545 (patch) | |
tree | 2b330d60da88d6c195ae1943ad93fe2b393469fd /plugins/MetaContacts/src/meta_api.cpp | |
parent | 6aff7a968c46f4080a24bd372c6ec1337766adf7 (diff) |
these conversions aren't needed either
git-svn-id: http://svn.miranda-ng.org/main/trunk@8088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MetaContacts/src/meta_api.cpp')
-rw-r--r-- | plugins/MetaContacts/src/meta_api.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/MetaContacts/src/meta_api.cpp b/plugins/MetaContacts/src/meta_api.cpp index 6fbad29f5d..600249cefb 100644 --- a/plugins/MetaContacts/src/meta_api.cpp +++ b/plugins/MetaContacts/src/meta_api.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //lParam=0
//returns a handle to the parent metacontact, or null if this contact is not a subcontact
INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)(HANDLE)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
+ return (INT_PTR)(HANDLE)db_get_dw(wParam, META_PROTO, "Handle", 0);
}
//gets the handle for the default contact
@@ -40,9 +40,9 @@ INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a handle to the default contact, or null on failure
INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) {
- DWORD default_contact_number = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
+ DWORD default_contact_number = db_get_dw(wParam, META_PROTO, "Default", -1);
if (default_contact_number != -1) {
- return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, default_contact_number);
+ return (INT_PTR)Meta_GetContactHandle(wParam, default_contact_number);
}
return 0;
}
@@ -52,7 +52,7 @@ INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a DWORD contact number, or -1 on failure
INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) {
- return db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
+ return db_get_dw(wParam, META_PROTO, "Default", -1);
}
//gets the handle for the 'most online' contact
@@ -60,7 +60,7 @@ INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a handle to the 'most online' contact
INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetMostOnline((MCONTACT)wParam);
+ return (INT_PTR)Meta_GetMostOnline(wParam);
}
//gets the number of subcontacts for a metacontact
@@ -68,7 +68,7 @@ INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a DWORD representing the number of subcontacts for the given metacontact
INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", -1);
return num_contacts;
}
@@ -77,7 +77,7 @@ INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns a handle to the specified subcontact
INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, (DWORD)lParam);
+ return (INT_PTR)Meta_GetContactHandle(wParam, (DWORD)lParam);
}
//sets the default contact, using the subcontact's contact number
@@ -85,15 +85,15 @@ INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", -1);
if (num_contacts == -1)
return 1;
if ((DWORD)lParam >= num_contacts || (DWORD)lParam < 0)
return 1;
- if (db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam))
+ if (db_set_dw(wParam, META_PROTO, "Default", (DWORD)lParam))
return 1;
- NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, (int)lParam));
+ NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle(wParam, (int)lParam));
return 0;
}
@@ -102,9 +102,9 @@ INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) {
- MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)lParam, META_PROTO, "Handle", 0);
- DWORD contact_number = Meta_GetContactNumber((MCONTACT)lParam);
- if (contact_number == -1 || !hMeta || hMeta != (MCONTACT)wParam)
+ MCONTACT hMeta = (MCONTACT)db_get_dw(lParam, META_PROTO, "Handle", 0);
+ DWORD contact_number = Meta_GetContactNumber(lParam);
+ if (contact_number == -1 || !hMeta || hMeta != wParam)
return 1;
if (db_set_dw(hMeta, META_PROTO, "Default", contact_number))
return 1;
@@ -118,9 +118,9 @@ INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam);
+ MCONTACT hContact = Meta_GetContactHandle(wParam, (int)lParam);
MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ if (!hContact || !hMeta || hMeta != wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -134,9 +134,9 @@ INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) {
- MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hContact = lParam;
MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ if (!hContact || !hMeta || hMeta != wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -150,10 +150,10 @@ INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) {
- if (db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0))
+ if (db_get_b(wParam, META_PROTO, "ForceDefault", 0))
return 1;
- db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw(wParam, META_PROTO, "ForceSend", 0);
NotifyEventHooks(hEventUnforceSend, wParam, lParam);
return 0;
@@ -169,7 +169,7 @@ INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) { INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) {
// forward to menu function
Meta_ForceDefault(wParam, lParam);
- return db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ return db_get_b(wParam, META_PROTO, "ForceDefault", 0);
}
// method to get state of 'force' for a metacontact
@@ -179,11 +179,11 @@ INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) { // or if none is in force, the value (DWORD)-1 will be copied
// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
INT_PTR MetaAPI_GetForceState(WPARAM wParam, LPARAM lParam) {
- MCONTACT hMeta = (MCONTACT)wParam;
+ MCONTACT hMeta = wParam;
if ( !hMeta) return 0;
if (db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) {
- if (lParam) *(DWORD *)lParam = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
+ if (lParam) *(DWORD *)lParam = db_get_dw(wParam, META_PROTO, "Default", -1);
return 1;
}
@@ -216,7 +216,7 @@ INT_PTR MetaAPI_ConvertToMeta(WPARAM wParam, LPARAM lParam) { // lParam=(HANDLE)hMeta
// add an existing contact to a metacontact
INT_PTR MetaAPI_AddToMeta(WPARAM wParam, LPARAM lParam) {
- return Meta_Assign((MCONTACT)wParam, (MCONTACT)lParam, FALSE);
+ return Meta_Assign(wParam, lParam, FALSE);
}
// added 0.9.5.0 (22/3/05)
|