summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/Properties.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-16 20:01:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-16 20:01:14 +0300
commit39390b02dbd5aa7eb21a83773fa561b39f8828bc (patch)
tree7982eda1257f7466b5663c2865fdb7804c397257 /plugins/NewAwaySysMod/src/Properties.cpp
parent5046973a41e412afd06d6a78a3b9bce226e3cf50 (diff)
always hated these long expressions: contact_iter makes them much shorter
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);
}
}