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 --- protocols/VKontakte/src/vk_chats.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/VKontakte/src/vk_chats.cpp') diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 2021f0ee12..5b8b7f7b0f 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -73,7 +73,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) GCDEST gcd = { m_szModuleName, sid, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - for (int i = SIZEOF(sttStatuses)-1; i >= 0; i--) { + for (int i = _countof(sttStatuses)-1; i >= 0; i--) { gce.ptszStatus = TranslateTS(sttStatuses[i]); CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce); } @@ -839,11 +839,11 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam) return 0; if (gcmi->Type == MENU_ON_LOG) { - gcmi->nItems = SIZEOF(sttLogListItems); + gcmi->nItems = _countof(sttLogListItems); gcmi->Item = sttLogListItems; } else if (gcmi->Type == MENU_ON_NICKLIST) { - gcmi->nItems = SIZEOF(sttListItems); + gcmi->nItems = _countof(sttListItems); gcmi->Item = sttListItems; } return 0; @@ -922,7 +922,7 @@ static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L } TCHAR tszTitle[1024]; - GetDlgItemText(hwndDlg, IDC_TITLE, tszTitle, SIZEOF(tszTitle)); + GetDlgItemText(hwndDlg, IDC_TITLE, tszTitle, _countof(tszTitle)); ppro->CreateNewChat(uids, tszTitle); EndDialog(hwndDlg, 0); return TRUE; -- cgit v1.2.3