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/BasicHistory/src/EventList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/BasicHistory/src') 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& 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& tempList, bool noF tempList.push_back(ti); } } - hDbEvent = db_event_next(hContact, hDbEvent); } if (!noExt) { -- cgit v1.2.3