summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/icolib.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Gadu-Gadu/src/icolib.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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/Gadu-Gadu/src/icolib.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/icolib.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Gadu-Gadu/src/icolib.cpp b/protocols/Gadu-Gadu/src/icolib.cpp
index a0b9c291de..c527755058 100644
--- a/protocols/Gadu-Gadu/src/icolib.cpp
+++ b/protocols/Gadu-Gadu/src/icolib.cpp
@@ -41,23 +41,23 @@ extern IconItem iconList[] =
{ LPGEN("Concurrent sessions"), "sessions", IDI_SESSIONS }
};
-HANDLE hIconLibItem[SIZEOF(iconList)];
+HANDLE hIconLibItem[_countof(iconList)];
void gg_icolib_init()
{
- Icon_Register(hInstance, "Protocols/" GGDEF_PROTO, iconList, SIZEOF(iconList), GGDEF_PROTO);
+ Icon_Register(hInstance, "Protocols/" GGDEF_PROTO, iconList, _countof(iconList), GGDEF_PROTO);
}
HICON LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", GGDEF_PROTO, name);
+ mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", GGDEF_PROTO, name);
return IcoLib_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(int iconId)
{
- for(int i = 0; i < SIZEOF(iconList); i++)
+ for(int i = 0; i < _countof(iconList); i++)
if (iconList[i].defIconID == iconId)
return hIconLibItem[i];
return NULL;
@@ -66,7 +66,7 @@ HANDLE GetIconHandle(int iconId)
void ReleaseIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", GGDEF_PROTO, name);
+ mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", GGDEF_PROTO, name);
IcoLib_Release(szSettingName, big);
}