summaryrefslogtreecommitdiff
path: root/plugins/NoHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-14 12:34:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-14 12:34:32 +0300
commit5a09915186e4ae70cc39e9343ca02a1b860d7f94 (patch)
treeba115287c182bc8dae3308fc23f8d197d68850cb /plugins/NoHistory/src
parent2b30685427500c9eedac4c0c4862b32af144a90c (diff)
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/NoHistory/src')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 21bdc3dec3..4f51522157 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -89,12 +89,9 @@ void RemoveReadEvents(MCONTACT hContact = 0)
void RemoveAllEvents(MCONTACT hContact)
{
- MEVENT hDBEvent = db_event_first(hContact);
- while(hDBEvent) {
- MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);
- db_event_delete(hDBEvent);
- hDBEvent = hDBEventNext;
- }
+ DB::ECPTR pCursor(DB::Events(hContact));
+ while (pCursor.FetchNext())
+ pCursor.DeleteEvent();
}
void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)