From 5a09915186e4ae70cc39e9343ca02a1b860d7f94 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 May 2020 12:34:32 +0300 Subject: simple database event cycles moved to cursors --- plugins/Msg_Export/src/options.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/Msg_Export') diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 932f9f3778..0d795588bf 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -146,11 +146,9 @@ void __cdecl exportContactsMessages(ExportDialogData *data) list &rclCurList = AllEvents[GetFilePathFromUser(hContact)]; - MEVENT hDbEvent = db_event_first(hContact); - while (hDbEvent) { + DB::ECPTR pCursor(DB::Events(hContact)); + while (MEVENT hDbEvent = pCursor.FetchNext()) rclCurList.push_back(CLDBEvent(hContact, hDbEvent)); - hDbEvent = db_event_next(hContact, hDbEvent); - } SendMessage(hProg, PBM_SETPOS, nCur, 0); RedrawWindow(hDlg, nullptr, nullptr, RDW_ALLCHILDREN | RDW_UPDATENOW); -- cgit v1.2.3