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/JabberG/src/jabber_disco.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/JabberG/src/jabber_disco.cpp') diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 425b6a18ef..99658d0a49 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -380,9 +380,9 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) { TCHAR szJid[JABBER_MAX_JID_LEN]; TCHAR szNode[ 512 ]; - if (!GetDlgItemText(hwndDlg, IDC_COMBO_JID, szJid, SIZEOF(szJid))) + if (!GetDlgItemText(hwndDlg, IDC_COMBO_JID, szJid, _countof(szJid))) szJid[ 0 ] = 0; - if (!GetDlgItemText(hwndDlg, IDC_COMBO_NODE, szNode, SIZEOF(szNode))) + if (!GetDlgItemText(hwndDlg, IDC_COMBO_NODE, szNode, _countof(szNode))) szNode[ 0 ] = 0; ComboAddRecentString(hwndDlg, IDC_COMBO_JID, "discoWnd_rcJid", szJid); @@ -504,7 +504,7 @@ void CJabberProto::ApplyNodeIcon(HTREELISTITEM hItem, CJabberSDNode *pNode) iOverlay = SD_OVERLAY_NONE; } - for (int i=0; i < SIZEOF(sttNodeIcons); i++) + for (int i=0; i < _countof(sttNodeIcons); i++) { if (!sttNodeIcons[i].iconIndex && !sttNodeIcons[i].iconName) continue; @@ -674,7 +674,7 @@ void CJabberDlgDiscovery::OnInitDialog() TreeList_Create(hwndList); TreeList_AddIcon(hwndList, m_proto->LoadIconEx("main"), 0); - for (int i=0; i < SIZEOF(sttNodeIcons); i++) + for (int i=0; i < _countof(sttNodeIcons); i++) { bool needDestroy = false; HICON hIcon; @@ -1201,7 +1201,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM HMENU hMenu = CreatePopupMenu(); BOOL lastSeparator = TRUE; bool bFilterItems = !GetAsyncKeyState(VK_CONTROL); - for (int i=0; i < SIZEOF(items); i++) { + for (int i=0; i < _countof(items); i++) { JABBER_LIST_ITEM *rosterItem = NULL; if (bFilterItems) { if ((items[i].flags & SD_FLG_NONODE) && pNode->GetNode()) @@ -1325,7 +1325,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_COPYINFO: { TCHAR buf[8192]; - pNode->GetTooltipText(buf, SIZEOF(buf)); + pNode->GetTooltipText(buf, _countof(buf)); JabberCopyText(m_pDlgServiceDiscovery->GetHwnd(), buf); } break; -- cgit v1.2.3