diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-08 15:29:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-08 15:29:44 +0300 |
commit | 99962115431435cf17dfae4d3b7c8d7d55d824bf (patch) | |
tree | 1c80a533f5d3d4ba9d3b894a9a38b9167fe3047e /src | |
parent | a23186175cff579d5aeb231372e87b0b852bdb38 (diff) |
life is too short to remember whether this structure is zeroed or not
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdpopup/src/services.cpp | 44 | ||||
-rw-r--r-- | src/mir_app/src/chat_tools.cpp | 2 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/core/stdpopup/src/services.cpp b/src/core/stdpopup/src/services.cpp index ce8650f2ce..7303183f86 100644 --- a/src/core/stdpopup/src/services.cpp +++ b/src/core/stdpopup/src/services.cpp @@ -260,11 +260,11 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) return -1; if (Popup_Enabled()) { - POPUPDATAW pd = {0}; - mir_wstrcpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); - pd.lchIcon = LoadIcon(nullptr, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); - wcsncpy(pd.lpwzText, _A2T((char *)wParam), MAX_SECONDLINE); pd.lpwzText[MAX_SECONDLINE-1] = 0; - PUAddPopupW(&pd); + POPUPDATAW ppd; + mir_wstrcpy(ppd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); + ppd.lchIcon = LoadIcon(nullptr, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); + wcsncpy(ppd.lpwzText, _A2T((char *)wParam), MAX_SECONDLINE); ppd.lpwzText[MAX_SECONDLINE-1] = 0; + PUAddPopupW(&ppd); } return 0; } @@ -275,11 +275,11 @@ static INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam) return -1; if (Popup_Enabled()) { - POPUPDATAW pd = {0}; - mir_wstrcpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); - pd.lchIcon = LoadIcon(nullptr, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); - wcsncpy(pd.lpwzText, (wchar_t *)wParam, MAX_SECONDLINE); - PUAddPopupW(&pd); + POPUPDATAW ppd; + mir_wstrcpy(ppd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); + ppd.lchIcon = LoadIcon(nullptr, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); + wcsncpy(ppd.lpwzText, (wchar_t *)wParam, MAX_SECONDLINE); + PUAddPopupW(&ppd); } return 0; } @@ -361,20 +361,20 @@ static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam) if (NotifyEventHooks(hEventNotify, (WPARAM)pdc->hContact, (LPARAM)pc->PluginWindowProc)) return 0; - PopupData pd = { sizeof(PopupData) }; - if (pc->flags & PCF_UNICODE) pd.flags |= PDF_UNICODE; - pd.colorBack = pc->colorBack; - pd.colorText = pc->colorText; - pd.SetIcon(pc->hIcon); - pd.timeout = pc->iSeconds; - pd.windowProc = pc->PluginWindowProc; + PopupData ppd = { sizeof(PopupData) }; + if (pc->flags & PCF_UNICODE) ppd.flags |= PDF_UNICODE; + ppd.colorBack = pc->colorBack; + ppd.colorText = pc->colorText; + ppd.SetIcon(pc->hIcon); + ppd.timeout = pc->iSeconds; + ppd.windowProc = pc->PluginWindowProc; - pd.hContact = pdc->hContact; - pd.opaque = pdc->PluginData; - pd.pszTitle = (char *)pdc->szTitle.a; - pd.pszText = (char *)pdc->szText.a; + ppd.hContact = pdc->hContact; + ppd.opaque = pdc->PluginData; + ppd.pszTitle = (char *)pdc->szTitle.a; + ppd.pszText = (char *)pdc->szText.a; - ShowPopup(pd); + ShowPopup(ppd); } return 0; } diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 9762f03ee1..d84db16bb2 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -175,7 +175,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa mir_vsnwprintf(szBuf, 4096, fmt, marker);
va_end(marker);
- POPUPDATAW pd = { 0 };
+ POPUPDATAW pd;
pd.lchContact = hContact;
if (hIcon)
|