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