summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/Properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewAwaySysMod/src/Properties.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/Properties.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp
index 7fc0fa32a5..64b6ac0f83 100644
--- a/plugins/NewAwaySysMod/src/Properties.cpp
+++ b/plugins/NewAwaySysMod/src/Properties.cpp
@@ -34,16 +34,13 @@ void ResetSettingsOnStatusChange(const char *szProto = nullptr, int bResetPerson
if (bResetPersonalMsgs)
bResetPersonalMsgs = !g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_SAVEPERSONALMSGS);
- MCONTACT hContact = db_find_first();
- while (hContact) {
+ for (auto &hContact : contact_iter()) {
const char *szCurProto;
if (!szProto || ((szCurProto = GetContactProto(hContact)) && !mir_strcmp(szProto, szCurProto))) {
ResetContactSettingsOnStatusChange(hContact);
- if (bResetPersonalMsgs) {
+ if (bResetPersonalMsgs)
CContactSettings(Status, hContact).SetMsgFormat(SMF_PERSONAL, nullptr); // TODO: delete only when SAM dialog opens?
- }
}
- hContact = db_find_next(hContact);
}
}