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 /plugins/IgnoreState | |
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 'plugins/IgnoreState')
-rw-r--r-- | plugins/IgnoreState/src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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");
|