summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-20 19:32:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-20 19:32:28 +0300
commit999d22f6c3c618cde52097547e53703664d7e665 (patch)
tree651589d4660b8346729c12f0bea93d0570fba1e3 /plugins/Dbx_sqlite/src
parent601ec263ad0887d7a8a090badc3c77cfcb24f0d5 (diff)
db_event_delete: unused parameter removed
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp10
-rwxr-xr-xplugins/Dbx_sqlite/src/dbintf.h2
2 files changed, 5 insertions, 7 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 77aee3f4e4..ef6562f85a 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -207,14 +207,13 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, DBEVENTINFO *dbei)
return hDbEvent;
}
-BOOL CDbxSQLite::DeleteEvent(MCONTACT hContact, MEVENT hDbEvent)
+BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent)
{
if (hDbEvent == 0)
return 1;
- DBCachedContact *cc = (hContact)
- ? m_cache->GetCachedContact(hContact)
- : &m_system;
+ MEVENT hContact = GetEventContact(hDbEvent);
+ DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system;
if (cc == nullptr)
return 1;
@@ -236,13 +235,12 @@ BOOL CDbxSQLite::DeleteEvent(MCONTACT hContact, MEVENT hDbEvent)
if (rc != SQLITE_DONE)
return 1;
-
cc->DeleteEvent(hDbEvent);
if (cc->IsSub() && (cc = m_cache->GetCachedContact(cc->parentID)))
cc->DeleteEvent(hDbEvent);
}
- NotifyEventHooks(g_hevEventDeleted, hContact, (LPARAM)hDbEvent);
+ NotifyEventHooks(g_hevEventDeleted, hContact, hDbEvent);
return 0;
}
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h
index fdab9d8b4c..16a8db11dd 100755
--- a/plugins/Dbx_sqlite/src/dbintf.h
+++ b/plugins/Dbx_sqlite/src/dbintf.h
@@ -64,7 +64,7 @@ public:
STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override;
STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe) override;
- STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) override;
+ STDMETHODIMP_(BOOL) DeleteEvent(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override;