diff options
author | George Hazan <ghazan@miranda.im> | 2021-02-28 22:26:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-02-28 22:26:32 +0300 |
commit | 6b7f8c2129116382c8c67d05164110238845a1e0 (patch) | |
tree | 89f2361fcdcca5e9b1ad613de501f31856dcf2bd /plugins/FavContacts/src | |
parent | b2c82971f99a2e46cf9a0819ed86154d06d1f92a (diff) |
some evident reverse iterators moved to cursors
Diffstat (limited to 'plugins/FavContacts/src')
-rw-r--r-- | plugins/FavContacts/src/contact_cache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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)) {
|