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/IgnoreState/src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/IgnoreState/src') diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index bcceb62910..ad8083d2d4 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -43,7 +43,7 @@ IGNOREITEMS ii[] = { { LPGENT("Typing Notify"), IGNOREEVENT_TYPINGNOTIFY, SKINICON_OTHER_TYPING } }; -int nII = SIZEOF(ii); +int nII = _countof(ii); ///////////////////////////////////////////////////////////////////////////////////////// @@ -90,7 +90,7 @@ INT_PTR isIgnored(MCONTACT hContact, int type) if (isIgnored(hContact, ii[i].type)) ii[i].filtered ? filtered++ : all++; - return (all + filtered == SIZEOF(ii) - 1) ? 1 : (all > 0 ? -1 : 0); + return (all + filtered == _countof(ii) - 1) ? 1 : (all > 0 ? -1 : 0); } void applyExtraImage(MCONTACT hContact) @@ -121,7 +121,7 @@ VOID fill_filter(void) currentFilter = bUseMirandaSettings ? db_get_dw(NULL, "Ignore", "Default1", 0) : db_get_dw(NULL, MODULENAME, "Filter", 0x8); - for (int i = 0; i < SIZEOF(ii); i++) { + for (int i = 0; i < _countof(ii); i++) { if (checkState((ii[i].type))) ii[i].filtered = true; else @@ -167,7 +167,7 @@ extern "C" int __declspec(dllexport) Load(void) HookEvent(ME_DB_CONTACT_SETTINGCHANGED, onContactSettingChanged); //IcoLib support - Icon_Register(g_hInst, LPGEN("Ignore State"), iconList, SIZEOF(iconList)); + Icon_Register(g_hInst, LPGEN("Ignore State"), iconList, _countof(iconList)); hExtraIcon = ExtraIcon_Register("ignore", LPGEN("Ignore State"), "ignore_full"); -- cgit v1.2.3