Skip to content

Commit

Permalink
Added initializers.
Browse files Browse the repository at this point in the history
  • Loading branch information
skst committed Apr 21, 2021
1 parent 8659616 commit c8dd5f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Shared/ToolTipCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ MyToolTipCtrl::Instances MyToolTipCtrl::_instances;
MyToolTipCtrl::MyToolTipCtrl(const bool bOnlyShowTipsIfActive)
: _bOnlyShowTipsIfActive(bOnlyShowTipsIfActive)
{
INITCOMMONCONTROLSEX icx;
INITCOMMONCONTROLSEX icx{};
icx.dwSize = sizeof icx;
icx.dwICC = ICC_BAR_CLASSES;
::InitCommonControlsEx(&icx);
Expand Down Expand Up @@ -103,7 +103,7 @@ void MyToolTipCtrl::DeleteTools()
{
while (GetToolCount() > 0)
{
TOOLINFO ti;
TOOLINFO ti{};
ti.cbSize = sizeof ti;
ti.lpszText = nullptr;
::SendMessage(m_hWnd, TTM_ENUMTOOLS, 0, (LPARAM) &ti);
Expand All @@ -114,7 +114,7 @@ void MyToolTipCtrl::DeleteTools()

void MyToolTipCtrl::DeleteTool(const HWND hWndSink, const UINT_PTR id)
{
TOOLINFO ti;
TOOLINFO ti{};
ti.cbSize = sizeof ti;
ti.hwnd = hWndSink;
ti.uFlags = 0;
Expand Down Expand Up @@ -184,7 +184,7 @@ void MyToolTipCtrl::AddTool(const bool bTrack, const HWND hWndControl, HWND hWnd
if (hWndSink == nullptr)
hWndSink = hWndControl;

TOOLINFO ti;
TOOLINFO ti{};
ti.cbSize = sizeof ti;
ti.hwnd = hWndSink;
if (bTrack)
Expand Down Expand Up @@ -300,7 +300,7 @@ bool MyToolTipCtrl::HitTooltipControl(HWND hWnd, const POINT& pt)
skst::MyLog::GetLog().LogV("\tTooltip control has %d tools\n", GetToolCount());
#endif

TOOLINFO ti;
TOOLINFO ti{};
ti.cbSize = sizeof ti;
for (int i = 0; i < GetToolCount(); ++i)
{
Expand Down Expand Up @@ -343,7 +343,7 @@ bool MyToolTipCtrl::HitTooltipControl(HWND hWnd, const POINT& pt)
has an active tool, we deactivate it (because this tool/control is
no longer hit).
*/
TOOLINFO tiCur;
TOOLINFO tiCur{};
tiCur.cbSize = sizeof tiCur;
tiCur.lpszText = nullptr;
if (::SendMessage(m_hWnd, TTM_GETCURRENTTOOL, 0, (LPARAM) &tiCur))
Expand Down Expand Up @@ -466,7 +466,7 @@ void MyToolTipCtrl::ActivateTooltip(const TOOLINFO& ti, bool bActivate)
If they're different, we've switched to a new tool so we
deactivate the old one.
*/
TOOLINFO tiCur;
TOOLINFO tiCur{};
tiCur.cbSize = sizeof tiCur;
tiCur.lpszText = nullptr;
if (::SendMessage(m_hWnd, TTM_GETCURRENTTOOL, 0, (LPARAM) &tiCur))
Expand Down

0 comments on commit c8dd5f8

Please sign in to comment.