From 6b7f8c2129116382c8c67d05164110238845a1e0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 Feb 2021 22:26:32 +0300 Subject: some evident reverse iterators moved to cursors --- plugins/FavContacts/src/contact_cache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/FavContacts/src') diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index e3b05f2c24..42f46da620 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -84,7 +84,8 @@ void CContactCache::Rebuild() info->hContact = hContact; info->rate = 0; - for (MEVENT hEvent = db_event_last(hContact); hEvent; hEvent = db_event_prev(hContact, hEvent)) { + DB::ECPTR cursor(DB::EventsRev(hContact)); + while (MEVENT hEvent = cursor.FetchNext()) { DBEVENTINFO dbei = {}; if (!db_event_get(hEvent, &dbei)) { if (float weight = GetEventWeight(timestamp - dbei.timestamp)) { -- cgit v1.2.3