summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src/utils.cpp
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/StopSpamPlus/src/utils.cpp
parent2b30685427500c9eedac4c0c4862b32af144a90c (diff)
simple database event cycles moved to cursors
Diffstat (limited to 'plugins/StopSpamPlus/src/utils.cpp')
-rw-r--r--plugins/StopSpamPlus/src/utils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp
index e01f73802e..427495026c 100644
--- a/plugins/StopSpamPlus/src/utils.cpp
+++ b/plugins/StopSpamPlus/src/utils.cpp
@@ -14,8 +14,8 @@ tstring& GetDlgItemString(HWND hwnd, int id)
bool IsExistMyMessage(MCONTACT hContact)
{
- MEVENT hDbEvent = db_event_first(hContact);
- while (hDbEvent) {
+ DB::ECPTR pCursor(DB::Events(hContact));
+ while (MEVENT hDbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
if (db_event_get(hDbEvent, &dbei))
break;
@@ -26,7 +26,6 @@ bool IsExistMyMessage(MCONTACT hContact)
// ...let the event go its way
return true;
}
- hDbEvent = db_event_next(hContact, hDbEvent);
}
return false;
}