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 /protocols/VKontakte/src/vk_chats.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 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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;
|