Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/NotificationMessage.cpp

Issue 5163581322559488: Issue 1283 - wrong usage of memset, fix sizeof, make proper initializing (Closed)
Patch Set: fix diff direction Created Oct. 8, 2014, 9:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/AdblockPlusClient.cpp ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/NotificationMessage.cpp
===================================================================
--- a/src/plugin/NotificationMessage.cpp
+++ b/src/plugin/NotificationMessage.cpp
@@ -16,7 +16,7 @@
if (!commonControlsInitialized)
{
INITCOMMONCONTROLSEX commControls;
- commControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ commControls.dwSize = sizeof(commControls);
commControls.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&commControls);
commonControlsInitialized = true;
@@ -39,7 +39,7 @@
SetWindowPos(toolTipWindow, HWND_TOPMOST,0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
TOOLINFOW ti = {};
- ti.cbSize = sizeof(TOOLINFOW);
+ ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND | TTF_TRACK | TTF_TRANSPARENT;
ti.hwnd = parentWindow;
ti.hinst = NULL;
@@ -77,7 +77,7 @@
bool NotificationMessage::SetTextAndIcon(std::wstring text, std::wstring title, int icon)
{
TOOLINFOW ti = {};
- ti.cbSize = sizeof(TOOLINFOW);
+ ti.cbSize = sizeof(ti);
ti.hwnd = parentWindow;
ti.hinst = NULL;
ti.uId = (UINT_PTR)parentWindow;
« no previous file with comments | « src/plugin/AdblockPlusClient.cpp ('k') | src/plugin/PluginClass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld