diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
commit | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch) | |
tree | ded36ec10c55fb5d33c8d2e471ec808eeb058a04 /plugins/Weather/src/weather_opt.cpp | |
parent | 237d02ebbabbedfb8b33160ebfb5250bbd491eca (diff) |
Fix buf size for Get/Set text, open/save file name
SMS: SIZE_T -> size_t
MRA: small code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_opt.cpp')
-rw-r--r-- | plugins/Weather/src/weather_opt.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index 1b4573da80..87facdb349 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -373,14 +373,14 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) }
// get update time and remove the old timer
- GetDlgItemText(hdlg, IDC_UPDATETIME, str, sizeof(str));
+ GetDlgItemText(hdlg, IDC_UPDATETIME, str, SIZEOF(str));
opt.UpdateTime = (WORD)_ttoi(str);
if (opt.UpdateTime < 1) opt.UpdateTime = 1;
KillTimer(NULL, timerId);
timerId = SetTimer(NULL, 0, opt.UpdateTime * 60000, (TIMERPROC)timerProc);
// other general options
- GetDlgItemText(hdlg, IDC_DEGREE, opt.DegreeSign, sizeof(opt.DegreeSign));
+ GetDlgItemText(hdlg, IDC_DEGREE, opt.DegreeSign, SIZEOF(opt.DegreeSign));
opt.StartupUpdate = IsDlgButtonChecked(hdlg, IDC_STARTUPUPD);
opt.AutoUpdate = IsDlgButtonChecked(hdlg, IDC_UPDATE);
opt.NoProtoCondition = !IsDlgButtonChecked(hdlg, IDC_PROTOCOND);
@@ -578,21 +578,21 @@ INT_PTR CALLBACK DlgProcText(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) // free memory for old settings
FreeTextVar();
// save new settings to memory
- GetDlgItemText(hdlg, IDC_CTEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_CTEXT, textstr, SIZEOF(textstr));
wSetData(&opt.cText, textstr);
- GetDlgItemText(hdlg, IDC_BTEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_BTEXT, textstr, SIZEOF(textstr));
wSetData(&opt.bText, textstr);
- GetDlgItemText(hdlg, IDC_BTITLE, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_BTITLE, textstr, SIZEOF(textstr));
wSetData(&opt.bTitle, textstr);
- GetDlgItemText(hdlg, IDC_ETEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_ETEXT, textstr, SIZEOF(textstr));
wSetData(&opt.eText, textstr);
- GetDlgItemText(hdlg, IDC_NTEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_NTEXT, textstr, SIZEOF(textstr));
wSetData(&opt.nText, textstr);
- GetDlgItemText(hdlg, IDC_HTEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_HTEXT, textstr, SIZEOF(textstr));
wSetData(&opt.hText, textstr);
- GetDlgItemText(hdlg, IDC_XTEXT, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_XTEXT, textstr, SIZEOF(textstr));
wSetData(&opt.xText, textstr);
- GetDlgItemText(hdlg, IDC_BTITLE2, textstr, MAX_TEXT_SIZE);
+ GetDlgItemText(hdlg, IDC_BTITLE2, textstr, SIZEOF(textstr));
wSetData(&opt.sText, textstr);
SaveOptions();
UpdateAllInfo(0, 0);
|