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/UserInfoEx/src/dlg_anniversarylist.cpp | |
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/UserInfoEx/src/dlg_anniversarylist.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 23ef5396dd..880ce91789 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -242,15 +242,15 @@ class CAnnivList case COLUMN_CONTACT:
case COLUMN_PROTO:
case COLUMN_DESC:
- ListView_GetItemText(pDlg->_hList, iItem1, pDlg->_sortHeader, szText1, SIZEOF(szText1));
- ListView_GetItemText(pDlg->_hList, iItem2, pDlg->_sortHeader, szText2, SIZEOF(szText2));
+ ListView_GetItemText(pDlg->_hList, iItem1, pDlg->_sortHeader, szText1, _countof(szText1));
+ ListView_GetItemText(pDlg->_hList, iItem2, pDlg->_sortHeader, szText2, _countof(szText2));
result = pDlg->_sortOrder * mir_tstrcmp(szText1, szText2);
break;
case COLUMN_AGE:
case COLUMN_ETA:
- ListView_GetItemText(pDlg->_hList, iItem1, pDlg->_sortHeader, szText1, SIZEOF(szText1));
- ListView_GetItemText(pDlg->_hList, iItem2, pDlg->_sortHeader, szText2, SIZEOF(szText2));
+ ListView_GetItemText(pDlg->_hList, iItem1, pDlg->_sortHeader, szText1, _countof(szText1));
+ ListView_GetItemText(pDlg->_hList, iItem2, pDlg->_sortHeader, szText2, _countof(szText2));
result = pDlg->_sortOrder * (_ttoi(szText1) - _ttoi(szText2));
break;
@@ -598,7 +598,7 @@ class CAnnivList LVCOLUMN lvc;
CHAR pszSetting[MAXSETTING];
- mir_snprintf(pszSetting, SIZEOF(pszSetting), "AnnivDlg_Col%d", iSubItem);
+ mir_snprintf(pszSetting, _countof(pszSetting), "AnnivDlg_Col%d", iSubItem);
lvc.cx = db_get_w(NULL, MODNAME, pszSetting, defaultWidth);
lvc.mask = LVCF_WIDTH | LVCF_TEXT;
lvc.iSubItem = iSubItem;
@@ -713,7 +713,7 @@ class CAnnivList AddSubItem(iItem, COLUMN_DESC, (LPTSTR)ad.Description());
// sixth line: date
- ad.DateFormatAlt(szText, SIZEOF(szText));
+ ad.DateFormatAlt(szText, _countof(szText));
AddSubItem(iItem, COLUMN_DATE, szText);
_numRows++;
@@ -877,7 +877,7 @@ public: int c, cc = Header_GetItemCount(ListView_GetHeader(_hList));
for (c = 0; c < cc; c++) {
- mir_snprintf(pszSetting, SIZEOF(pszSetting), "AnnivDlg_Col%d", c);
+ mir_snprintf(pszSetting, _countof(pszSetting), "AnnivDlg_Col%d", c);
db_set_w(NULL, MODNAME, pszSetting, (WORD)ListView_GetColumnWidth(_hList, c));
}
DeleteAllItems();
|