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/BasicHistory | |
parent | 2b30685427500c9eedac4c0c4862b32af144a90c (diff) |
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/BasicHistory')
-rw-r--r-- | plugins/BasicHistory/src/EventList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 834cc025fa..f6d03409dd 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -194,8 +194,9 @@ void HistoryEventList::GetTempList(std::list<EventTempIndex>& tempList, bool noF EventIndex ei;
ti.isExternal = false;
ei.isExternal = false;
- MEVENT hDbEvent = db_event_first(hContact);
- while (hDbEvent != NULL) {
+
+ DB::ECPTR pCursor(DB::Events(hContact));
+ while (MEVENT hDbEvent = pCursor.FetchNext()) {
if (isWndLocal && !IsWindow(m_hWnd))
break;
@@ -207,7 +208,6 @@ void HistoryEventList::GetTempList(std::list<EventTempIndex>& tempList, bool noF tempList.push_back(ti);
}
}
- hDbEvent = db_event_next(hContact, hDbEvent);
}
if (!noExt) {
|