summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-25 10:58:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-25 10:58:24 +0000
commitdd1460d664f7266920b07527f25f87ec8233daaf (patch)
tree3753e6fa678edf1b3d9bb020bb97e16ca75ff69d /plugins/Weather
parent9ff92d1cc83e39859891a65f5ada186806cef133 (diff)
valid options initialization
git-svn-id: http://svn.miranda-ng.org/main/trunk@6225 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather_opt.cpp7
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp13
2 files changed, 7 insertions, 13 deletions
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;
}