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/Scriver/src/globals.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Scriver/src/globals.cpp') diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 3ef13e7fa4..d7ebe89278 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -212,7 +212,7 @@ void ReleaseIcons() HICON GetCachedIcon(const char *name) { - for (int i = 0; i < SIZEOF(iconList); i++) + for (int i = 0; i < _countof(iconList); i++) if (!mir_strcmp(iconList[i].szName, name)) return IcoLib_GetIconByHandle(iconList[i].hIcolib); @@ -231,13 +231,13 @@ void LoadGlobalIcons() ImageList_RemoveAll(g_dat.hChatButtonIconList); ImageList_RemoveAll(g_dat.hHelperIconList); ImageList_RemoveAll(g_dat.hSearchEngineIconList); - for (i = 0; i < SIZEOF(buttonIcons); i++) { + for (i = 0; i < _countof(buttonIcons); i++) { if (buttonIcons[i] == NULL) ImageList_AddIcon_ProtoEx(g_dat.hButtonIconList, NULL, ID_STATUS_OFFLINE); else ImageList_AddIcon(g_dat.hButtonIconList, GetCachedIcon(buttonIcons[i])); } - for (i = 0; i < SIZEOF(chatButtonIcons); i++) + for (i = 0; i < _countof(chatButtonIcons); i++) ImageList_AddIcon(g_dat.hChatButtonIconList, GetCachedIcon(chatButtonIcons[i])); ImageList_AddIcon(g_dat.hHelperIconList, GetCachedIcon("scriver_OVERLAY")); -- cgit v1.2.3