summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/SetAwayMsg.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 /plugins/NewAwaySysMod/src/SetAwayMsg.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 'plugins/NewAwaySysMod/src/SetAwayMsg.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index a485cd6097..d91cae662f 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -434,7 +434,7 @@ void UpdateCheckboxesState(CCList *CList)
HICON g_LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", "", name);
+ mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", "", name);
return IcoLib_GetIcon(szSettingName, big);
}
@@ -601,7 +601,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
}
// init image buttons
- for (int i = 0; i < SIZEOF(Buttons); i++) {
+ for (int i = 0; i < _countof(Buttons); i++) {
HWND hButton = GetDlgItem(hwndDlg, Buttons[i].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[i].Text), BATF_TCHAR);
SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
@@ -612,7 +612,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.dll"), NULL);
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
- for (int i = 0; i < SIZEOF(Tooltips); i++) {
+ for (int i = 0; i < _countof(Tooltips); i++) {
ti.uId = (UINT_PTR)GetDlgItem(hwndDlg, Tooltips[i].DlgItemID);
ti.lpszText = TranslateTS(Tooltips[i].Text);
SendMessage(hWndTooltips, TTM_ADDTOOL, 0, (LPARAM)&ti);
@@ -849,7 +849,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
return true;
}
TCHAR BtnTitle[64];
- mir_sntprintf(BtnTitle, SIZEOF(BtnTitle), TranslateT("Closing in %d"), Countdown);
+ mir_sntprintf(BtnTitle, _countof(BtnTitle), TranslateT("Closing in %d"), Countdown);
SetDlgItemText(hwndDlg, IDC_OK, BtnTitle);
Countdown--;
}
@@ -1013,7 +1013,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
break;
case UM_ICONSCHANGED:
- for (int i = 0; i < SIZEOF(Buttons); i++)
+ for (int i = 0; i < _countof(Buttons); i++)
if (Buttons[i].IconIndex != ILI_NOICON)
SendDlgItemMessage(hwndDlg, Buttons[i].DlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_IconList[Buttons[i].IconIndex]);