From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/MenuItemEx/src/options.cpp') diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp index 495f34fb78..40960b4c0b 100644 --- a/plugins/MenuItemEx/src/options.cpp +++ b/plugins/MenuItemEx/src/options.cpp @@ -38,7 +38,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) TranslateDialogDefault(hdlg); - for (i = 0; i < SIZEOF(checkboxes); i++) + for (i = 0; i < _countof(checkboxes); i++) { CheckDlgButton(hdlg, checkboxes[i].idc, (flags & checkboxes[i].flag) ? BST_CHECKED : BST_UNCHECKED); } @@ -47,7 +47,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) { for (i = 0; i < 4; i++) { - GetDlgItemText(hdlg, checkboxes[i].idc, buffer, (SIZEOF(buffer) - 3)); + GetDlgItemText(hdlg, checkboxes[i].idc, buffer, (_countof(buffer) - 3)); mir_tstrcat(buffer, _T(" *")); SetDlgItemText(hdlg, checkboxes[i].idc, buffer); } @@ -72,7 +72,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) case PSN_APPLY: DWORD mod_flags = 0; - for (i = 0; i < SIZEOF(checkboxes); i++) + for (i = 0; i < _countof(checkboxes); i++) mod_flags |= IsDlgButtonChecked(hdlg, checkboxes[i].idc) ? checkboxes[i].flag : 0; db_set_dw(NULL, MODULENAME, "flags", mod_flags); -- cgit v1.2.3