diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-14 12:34:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-14 12:34:32 +0300 |
commit | 5a09915186e4ae70cc39e9343ca02a1b860d7f94 (patch) | |
tree | ba115287c182bc8dae3308fc23f8d197d68850cb /plugins/NoHistory/src | |
parent | 2b30685427500c9eedac4c0c4862b32af144a90c (diff) |
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/NoHistory/src')
-rw-r--r-- | plugins/NoHistory/src/dllmain.cpp | 9 |
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)
|