summaryrefslogtreecommitdiff
path: root/plugins/FingerprintNG
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FingerprintNG')
-rw-r--r--plugins/FingerprintNG/src/options.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index 9e8af894f4..a18db89934 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -76,19 +76,17 @@ static void StoreDBCheckState(HWND hwndDlg, int idCtrl, LPCSTR szSetting)
static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- int i;
-
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- for (i = 0; i < _countof(settings); i++)
- LoadDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName, settings[i].defValue);
+ for (auto &it : settings)
+ LoadDBCheckState(hwndDlg, it.idCtrl, it.szSetName, it.defValue);
break;
case WM_COMMAND:
if (HIWORD(wParam) == BN_CLICKED)
- for (i = 0; i < _countof(settings); i++)
- if (settings[i].idCtrl == LOWORD(wParam)) {
+ for (auto &it : settings)
+ if (it.idCtrl == LOWORD(wParam)) {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -97,8 +95,8 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_NOTIFY:
NMHDR *hdr = (NMHDR *)lParam;
if (hdr && hdr->code == PSN_APPLY) {
- for (i = 0; i < _countof(settings); i++)
- StoreDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName);
+ for (auto &it : settings)
+ StoreDBCheckState(hwndDlg, it.idCtrl, it.szSetName);
ClearFI();
RegisterIcons();