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/Msg_Export | |
parent | 2b30685427500c9eedac4c0c4862b32af144a90c (diff) |
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/Msg_Export')
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<CLDBEvent> &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);
|