summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:58:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:58:29 +0000
commit6aff7a968c46f4080a24bd372c6ec1337766adf7 (patch)
treed3045d1929922b02a434913fd1408401ce3ffb65 /src/mir_core
parent68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (diff)
these conversions aren't needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8087 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/db.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp
index 5b35cc2628..c22b0e1415 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -33,7 +33,7 @@ MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *
{
if (currDb != NULL) {
DBVARIANT dbv;
- if (!currDb->GetContactSetting((MCONTACT)hContact, szModule, szSetting, &dbv))
+ if (!currDb->GetContactSetting(hContact, szModule, szSetting, &dbv))
{
switch(dbv.type) {
case DBVT_BYTE: return dbv.bVal;
@@ -50,7 +50,7 @@ MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *
{
if (currDb != NULL) {
DBVARIANT dbv;
- if (!currDb->GetContactSetting((MCONTACT)hContact, szModule, szSetting, &dbv)) {
+ if (!currDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) {
switch(dbv.type) {
case DBVT_BYTE: return dbv.bVal;
case DBVT_WORD: return dbv.wVal;
@@ -66,7 +66,7 @@ MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, const char *szModule, const cha
{
if (currDb != NULL) {
DBVARIANT dbv;
- if (!currDb->GetContactSetting((MCONTACT)hContact, szModule, szSetting, &dbv)) {
+ if (!currDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) {
switch(dbv.type) {
case DBVT_BYTE: return dbv.bVal;
case DBVT_WORD: return dbv.wVal;
@@ -85,7 +85,7 @@ MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char
if (currDb == NULL)
return 1;
- return currDb->GetContactSetting((MCONTACT)hContact, szModule, szSetting, dbv);
+ return currDb->GetContactSetting(hContact, szModule, szSetting, dbv);
}
MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
@@ -94,7 +94,7 @@ MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const ch
return 1;
dbv->type = (BYTE)nType;
- return currDb->GetContactSettingStr((MCONTACT)hContact, szModule, szSetting, dbv);
+ return currDb->GetContactSettingStr(hContact, szModule, szSetting, dbv);
}
MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting)
@@ -131,7 +131,7 @@ MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const c
dbv.type = DBVT_ASCIIZ;
dbv.pszVal = pDest;
dbv.cchVal = cbDest;
- return currDb->GetContactSettingStatic((MCONTACT)hContact, szModule, szSetting, &dbv);
+ return currDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv);
}
MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest)
@@ -143,7 +143,7 @@ MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, con
dbv.type = DBVT_UTF8;
dbv.pszVal = pDest;
dbv.cchVal = cbDest;
- return currDb->GetContactSettingStatic((MCONTACT)hContact, szModule, szSetting, &dbv);
+ return currDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv);
}
MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, WCHAR *pDest, int cbDest)
@@ -155,7 +155,7 @@ MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const
dbv.type = DBVT_WCHAR;
dbv.pwszVal = pDest;
dbv.cchVal = cbDest;
- return currDb->GetContactSettingStatic((MCONTACT)hContact, szModule, szSetting, &dbv);
+ return currDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -169,7 +169,7 @@ MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char
cws.szModule = szModule;
cws.szSetting = szSetting;
cws.value = *dbv;
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, BYTE val)
@@ -181,7 +181,7 @@ MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const ch
cws.szSetting = szSetting;
cws.value.type = DBVT_BYTE;
cws.value.bVal = val;
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, WORD val)
@@ -193,7 +193,7 @@ MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const ch
cws.szSetting = szSetting;
cws.value.type = DBVT_WORD;
cws.value.wVal = val;
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val)
@@ -205,7 +205,7 @@ MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const c
cws.szSetting = szSetting;
cws.value.type = DBVT_DWORD;
cws.value.dVal = val;
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
@@ -217,7 +217,7 @@ MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const ch
cws.szSetting = szSetting;
cws.value.type = DBVT_ASCIIZ;
cws.value.pszVal = (char*)(val == NULL ? "" : val);
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const WCHAR *val)
@@ -229,7 +229,7 @@ MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const c
cws.szSetting = szSetting;
cws.value.type = DBVT_WCHAR;
cws.value.pwszVal = (WCHAR*)(val == NULL ? L"" : val);
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
@@ -241,7 +241,7 @@ MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const
cws.szSetting = szSetting;
cws.value.type = DBVT_UTF8;
cws.value.pszVal = (char*)(val == NULL ? "" : val);
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, void *val, unsigned len)
@@ -254,7 +254,7 @@ MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const
cws.value.type = DBVT_BLOB;
cws.value.cpbVal = (WORD)len;
cws.value.pbVal = (unsigned char*)val;
- return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
+ return currDb->WriteContactSetting(hContact, &cws);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -262,27 +262,27 @@ MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const
MIR_CORE_DLL(HANDLE) db_event_add(MCONTACT hContact, DBEVENTINFO *dbei)
{
- return (currDb == NULL) ? 0 : currDb->AddEvent((MCONTACT)hContact, dbei);
+ return (currDb == NULL) ? 0 : currDb->AddEvent(hContact, dbei);
}
MIR_CORE_DLL(int) db_event_count(MCONTACT hContact)
{
- return (currDb == NULL) ? 0 : currDb->GetEventCount((MCONTACT)hContact);
+ return (currDb == NULL) ? 0 : currDb->GetEventCount(hContact);
}
MIR_CORE_DLL(int) db_event_delete(MCONTACT hContact, HANDLE hDbEvent)
{
- return (currDb == NULL) ? 0 : currDb->DeleteEvent((MCONTACT)hContact, hDbEvent);
+ return (currDb == NULL) ? 0 : currDb->DeleteEvent(hContact, hDbEvent);
}
MIR_CORE_DLL(HANDLE) db_event_first(MCONTACT hContact)
{
- return (currDb == NULL) ? 0 : currDb->FindFirstEvent((MCONTACT)hContact);
+ return (currDb == NULL) ? 0 : currDb->FindFirstEvent(hContact);
}
MIR_CORE_DLL(HANDLE) db_event_firstUnread(MCONTACT hContact)
{
- return (currDb == NULL) ? 0 : currDb->FindFirstUnreadEvent((MCONTACT)hContact);
+ return (currDb == NULL) ? 0 : currDb->FindFirstUnreadEvent(hContact);
}
MIR_CORE_DLL(int) db_event_get(HANDLE hDbEvent, DBEVENTINFO *dbei)
@@ -297,17 +297,17 @@ MIR_CORE_DLL(int) db_event_getBlobSize(HANDLE hDbEvent)
MIR_CORE_DLL(MCONTACT) db_event_getContact(HANDLE hDbEvent)
{
- return (currDb == NULL) ? 0 : (MCONTACT)currDb->GetEventContact(hDbEvent);
+ return (currDb == NULL) ? 0 : currDb->GetEventContact(hDbEvent);
}
MIR_CORE_DLL(HANDLE) db_event_last(MCONTACT hContact)
{
- return (currDb == NULL) ? 0 : currDb->FindLastEvent((MCONTACT)hContact);
+ return (currDb == NULL) ? 0 : currDb->FindLastEvent(hContact);
}
MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, HANDLE hDbEvent)
{
- return (currDb == NULL) ? 0 : currDb->MarkEventRead((MCONTACT)hContact, hDbEvent);
+ return (currDb == NULL) ? 0 : currDb->MarkEventRead(hContact, hDbEvent);
}
MIR_CORE_DLL(HANDLE) db_event_next(HANDLE hDbEvent)
@@ -333,20 +333,20 @@ MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const ch
if (currDb == NULL)
return 1;
- return currDb->DeleteContactSetting((MCONTACT)hContact, szModule, szSetting);
+ return currDb->DeleteContactSetting(hContact, szModule, szSetting);
}
MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto)
{
- return (currDb == NULL) ? NULL : (MCONTACT)currDb->FindFirstContact(szProto);
+ return (currDb == NULL) ? NULL : currDb->FindFirstContact(szProto);
}
MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto)
{
- return (currDb == NULL) ? NULL : (MCONTACT)currDb->FindNextContact((MCONTACT)hContact, szProto);
+ return (currDb == NULL) ? NULL : currDb->FindNextContact(hContact, szProto);
}
-extern "C" MIR_CORE_DLL(void) db_setCurrent(MIDatabase* _db)
+extern "C" MIR_CORE_DLL(void) db_setCurrent(MIDatabase *_db)
{
currDb = _db;
}