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/BASS_interface/src/Main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/BASS_interface/src') diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index d4c292b718..71c227194c 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -186,7 +186,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else { DBVARIANT dbv = { 0 }; BASS_DEVICEINFO info; DWORD bassver = BASS_GetVersion(); - mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("un4seen's bass version: %d.%d.%d.%d"), bassver >> 24, (bassver >> 16) & 0xff, (bassver >> 8) & 0xff, bassver & 0xff); + mir_sntprintf(tmp, _countof(tmp), TranslateT("un4seen's bass version: %d.%d.%d.%d"), bassver >> 24, (bassver >> 16) & 0xff, (bassver >> 8) & 0xff, bassver & 0xff); SetDlgItemText(hwndDlg, IDC_BASSVERSION, tmp); SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_RESETCONTENT, 0, 0); @@ -222,7 +222,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara if (hBass != NULL) { SYSTEMTIME systime = { 0 }; - GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, SIZEOF(tmp)); + GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, _countof(tmp)); db_set_ts(NULL, ModuleName, OPT_OUTDEVICE, tmp); Volume = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0); @@ -558,7 +558,7 @@ int OnModulesLoaded(WPARAM, LPARAM) else { DBVARIANT dbv; if (db_get_ts(NULL, ModuleName, OPT_BASSPATH, &dbv)) { - mir_tstrncpy(CurrBassPath, VARST(_T("Plugins\\Bass\\bass.dll")), SIZEOF(CurrBassPath)); + mir_tstrncpy(CurrBassPath, VARST(_T("Plugins\\Bass\\bass.dll")), _countof(CurrBassPath)); db_set_ts(NULL, ModuleName, OPT_BASSPATH, CurrBassPath); } else { @@ -614,7 +614,7 @@ extern "C" int __declspec(dllexport) Load(void) HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanged); - Icon_Register(hInst, ModuleName, iconList, SIZEOF(iconList)); + Icon_Register(hInst, ModuleName, iconList, _countof(iconList)); return 0; } -- cgit v1.2.3