From 39390b02dbd5aa7eb21a83773fa561b39f8828bc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Mar 2018 20:01:14 +0300 Subject: always hated these long expressions: contact_iter makes them much shorter --- plugins/UserInfoEx/src/psp_options.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/UserInfoEx/src/psp_options.cpp') diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index e4481391ad..cd8d14ec6e 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -466,7 +466,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam DB::Module::Delete(NULL, USERINFO"ExW"); // delete old contactsettings - for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) { + for (auto &hContact : contact_iter()) { db_unset(hContact, USERINFO, "PListColWidth0"); db_unset(hContact, USERINFO, "PListColWidth1"); db_unset(hContact, USERINFO, "PListColWidth2"); @@ -669,7 +669,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam // walk through all the contacts stored in the DB MAnnivDate mdb; - for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) + for (auto &hContact : contact_iter()) mdb.DBMoveBirthDate(hContact, bOld, bNew); } -- cgit v1.2.3