summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory
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/BasicHistory
parent2b30685427500c9eedac4c0c4862b32af144a90c (diff)
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/BasicHistory')
-rw-r--r--plugins/BasicHistory/src/EventList.cpp6
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) {