diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/MenuItemEx/src/options.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx/src/options.cpp')
-rw-r--r-- | plugins/MenuItemEx/src/options.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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);
|