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/NewAwaySysMod/src/Properties.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/NewAwaySysMod/src/Properties.h') diff --git a/plugins/NewAwaySysMod/src/Properties.h b/plugins/NewAwaySysMod/src/Properties.h index c0dbd1dab7..50c3ee4762 100644 --- a/plugins/NewAwaySysMod/src/Properties.h +++ b/plugins/NewAwaySysMod/src/Properties.h @@ -123,7 +123,7 @@ public: int cxIcon = GetSystemMetrics(SM_CXSMICON); int cyIcon = GetSystemMetrics(SM_CYSMICON); int i; - for (i = 0; i < SIZEOF(Icons); i++) { + for (i = 0; i < _countof(Icons); i++) { if (IconList.GetSize() > i && IconList[i]) DestroyIcon(IconList[i]); @@ -317,7 +317,7 @@ public: CString ProtoStatusToDBSetting(const char *Prefix, int MoreOpt_PerStatusID = 0) { if (!MoreOpt_PerStatusID || g_MoreOptPage.GetDBValueCopy(MoreOpt_PerStatusID)) { - for (int i = 0; i < SIZEOF(StatusSettings); i++) + for (int i = 0; i < _countof(StatusSettings); i++) if (Status == StatusSettings[i].Status) return szProto ? (CString(Prefix) + "_" + szProto + "_" + StatusSettings[i].Setting) : (CString(Prefix) + StatusSettings[i].Setting); } @@ -381,7 +381,7 @@ public: __inline CString StatusToDBSetting(int Status, const char *Prefix, int MoreOpt_PerStatusID = 0) { if (!MoreOpt_PerStatusID || g_MoreOptPage.GetDBValueCopy(MoreOpt_PerStatusID)) - for (int i = 0; i < SIZEOF(StatusSettings); i++) + for (int i = 0; i < _countof(StatusSettings); i++) if (Status == StatusSettings[i].Status) return CString(Prefix) + StatusSettings[i].Setting; -- cgit v1.2.3