From dd1460d664f7266920b07527f25f87ec8233daaf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Sep 2013 10:58:24 +0000 Subject: valid options initialization git-svn-id: http://svn.miranda-ng.org/main/trunk@6225 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_opt.cpp | 7 +++---- plugins/Weather/src/weather_userinfo.cpp | 13 ++++--------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index 836a52ce8a..558b35175f 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -278,10 +278,9 @@ void SaveOptions(void) //============ OPTION INITIALIZATION ============ // register the weather option pages -int OptInit(WPARAM wParam,LPARAM lParam) { - OPTIONSDIALOGPAGE odp = {0}; - - odp.cbSize = sizeof(odp); +int OptInit(WPARAM wParam,LPARAM lParam) +{ + OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = hInst; // plugin options diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index 9ddce8d703..7d06772caa 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -33,24 +33,20 @@ information // lParam = current contact int UserInfoInit(WPARAM wParam, LPARAM lParam) { - OPTIONSDIALOGPAGE odp = {0}; - odp.cbSize = sizeof(odp); + OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = hInst; odp.position = 100000000; odp.ptszTitle = _T(WEATHERPROTONAME); - if (lParam == 0) - { + if (lParam == 0) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO); odp.pfnDlgProc = DlgProcINIPage; odp.flags = ODPF_TCHAR; UserInfo_AddPage(wParam, &odp); } - else - { + else { // check if it is a weather contact - if (IsMyContact((HANDLE)lParam)) - { + if (IsMyContact((HANDLE)lParam)) { // register the contact info page odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO); odp.pfnDlgProc = DlgProcUIPage; @@ -58,7 +54,6 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam) UserInfo_AddPage(wParam, &odp); } } - return 0; } -- cgit v1.2.3