summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 34bb77028c..dbd9095c82 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -461,7 +461,7 @@ public:
if (hItemUnknown && g_dat.bTypingUnknown)
clist.SetCheck(hItemUnknown, 1);
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem && db_get_b(hContact, SRMMMOD, SRMSGSET_TYPING, defType))
clist.SetCheck(hItem, 1);
@@ -476,7 +476,7 @@ public:
if (hItemUnknown)
g_dat.bTypingUnknown = clist.GetCheck(hItemUnknown);
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
HANDLE hItem = clist.FindContact(hContact);
if (hItem)
db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, clist.GetCheck(hItem));
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 0b99c01edc..30a4565263 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -240,7 +240,7 @@ static void RestoreUnreadMessageAlerts(void)
{
OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
bool autoPopup = false;