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 --- src/core/stdidle/src/idle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/stdidle') diff --git a/src/core/stdidle/src/idle.cpp b/src/core/stdidle/src/idle.cpp index 169d95148c..5a536dabc9 100644 --- a/src/core/stdidle/src/idle.cpp +++ b/src/core/stdidle/src/idle.cpp @@ -236,7 +236,7 @@ void CALLBACK IdleTimer(HWND, UINT, UINT_PTR idEvent, DWORD) int IdleGetStatusIndex(WORD status) { - for (int j = 0; j < SIZEOF(aa_Status); j++) + for (int j = 0; j < _countof(aa_Status); j++) if (aa_Status[j] == status) return j; @@ -267,7 +267,7 @@ static INT_PTR CALLBACK IdleOptsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L SendDlgItemMessage(hwndDlg, IDC_IDLE1STTIME, EM_LIMITTEXT, (WPARAM)2, 0); CheckDlgButton(hwndDlg, IDC_AASHORTIDLE, db_get_b(NULL, IDLEMOD, IDL_AAENABLE, 0) ? BST_CHECKED : BST_UNCHECKED); - for (j = 0; j < SIZEOF(aa_Status); j++) + for (j = 0; j < _countof(aa_Status); j++) SendDlgItemMessage(hwndDlg, IDC_AASTATUS, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetStatusModeDescription(aa_Status[j], 0)); j = IdleGetStatusIndex((WORD)(db_get_w(NULL, IDLEMOD, IDL_AASTATUS, 0))); -- cgit v1.2.3