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/DbEditorPP/src/findwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/DbEditorPP/src/findwindow.cpp') diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 6481fcf027..496d78fe81 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -98,11 +98,11 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP TCHAR text[FLD_SIZE]; TCHAR replace[FLD_SIZE] = {0}; - if (!GetDlgItemText(hwnd, IDC_TEXT, text, SIZEOF(text)) && !IsDlgButtonChecked(hwnd, IDC_EXACT)) break; + if (!GetDlgItemText(hwnd, IDC_TEXT, text, _countof(text)) && !IsDlgButtonChecked(hwnd, IDC_EXACT)) break; // empty replace is done only for exact match or entire replace if (LOWORD(wParam) == IDOK && - !GetDlgItemText(hwnd, IDC_REPLACE, replace, SIZEOF(replace)) && + !GetDlgItemText(hwnd, IDC_REPLACE, replace, _countof(replace)) && (!IsDlgButtonChecked(hwnd, IDC_ENTIRELY) && !IsDlgButtonChecked(hwnd, IDC_EXACT))) break; @@ -192,8 +192,8 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP { ItemInfo ii = {0}; ii.hContact = (MCONTACT)lvi.lParam; - ListView_GetItemTextA(hwndResults, hti.iItem, 2, ii.module, SIZEOF(ii.module)); - ListView_GetItemTextA(hwndResults, hti.iItem, 3, ii.setting, SIZEOF(ii.setting)); + ListView_GetItemTextA(hwndResults, hti.iItem, 2, ii.module, _countof(ii.module)); + ListView_GetItemTextA(hwndResults, hti.iItem, 3, ii.setting, _countof(ii.setting)); if (ii.setting[0]) ii.type = FW_SETTINGNAME; else if (ii.module[0]) @@ -245,7 +245,7 @@ void ItemFound(HWND hwnd, MCONTACT hContact, const char *module, const char *set else mode = TranslateT("Found"); - GetContactName(hContact, NULL, name, SIZEOF(name)); + GetContactName(hContact, NULL, name, _countof(name)); LVITEM lvi = {0}; lvi.mask = LVIF_PARAM; -- cgit v1.2.3