From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- plugins/Import/src/miranda.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Import/src/miranda.cpp') diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 1fa7471f63..d2fef1228c 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -303,16 +303,16 @@ INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wP case IDC_INCOMING: case IDC_OUTGOING: if (LOWORD(wParam) == IDC_ALL) - for (int i = 0; i < _countof(SysControls); i++) - CheckDlgButton(hwndDlg, SysControls[i], IsDlgButtonChecked(hwndDlg, SysControls[i]) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); + for (auto &it : SysControls) + CheckDlgButton(hwndDlg, it, IsDlgButtonChecked(hwndDlg, it) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); if (LOWORD(wParam) != IDC_OUTGOING) - for (int i = 0; i < _countof(InControls); i++) - CheckDlgButton(hwndDlg, InControls[i], IsDlgButtonChecked(hwndDlg, InControls[i]) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); + for (auto &it : InControls) + CheckDlgButton(hwndDlg, it, IsDlgButtonChecked(hwndDlg, it) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); if (LOWORD(wParam) != IDC_INCOMING) - for (int i = 0; i < _countof(OutControls); i++) - CheckDlgButton(hwndDlg, OutControls[i], IsDlgButtonChecked(hwndDlg, OutControls[i]) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); + for (auto &it : OutControls) + CheckDlgButton(hwndDlg, it, IsDlgButtonChecked(hwndDlg, it) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED); break; case IDC_MSG: -- cgit v1.2.3