Skip to content

Commit

Permalink
Initialize with curly braces!
Browse files Browse the repository at this point in the history
  • Loading branch information
danielayala94 committed Jan 22, 2022
1 parent 3d7c053 commit d4859d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions dev/ToastNotifications/ToastNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ namespace winrt::Microsoft::Windows::ToastNotifications::implementation

winrt::hstring m_group{};

uint32_t m_toastId = 0;
uint32_t m_toastId{ 0 };

winrt::Windows::Data::Xml::Dom::XmlDocument m_payload{};

winrt::Microsoft::Windows::ToastNotifications::ToastProgressData m_progressData{};

winrt::Windows::Foundation::DateTime m_expirationTime{};

bool m_expiresOnReboot = false;
bool m_expiresOnReboot{ false };

winrt::Microsoft::Windows::ToastNotifications::ToastPriority m_priority =
winrt::Microsoft::Windows::ToastNotifications::ToastPriority::Default;
winrt::Microsoft::Windows::ToastNotifications::ToastPriority m_priority
{ winrt::Microsoft::Windows::ToastNotifications::ToastPriority::Default };

bool m_suppressDisplay = false;
bool m_suppressDisplay{ false };
};
}
namespace winrt::Microsoft::Windows::ToastNotifications::factory_implementation
Expand Down
18 changes: 9 additions & 9 deletions test/TestApps/ToastNotificationsTestApp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ bool VerifyToastPayload()

bool VerifyToastTag()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.Tag() != winrt::hstring{ L"" })
{
Expand All @@ -260,7 +260,7 @@ bool VerifyToastTag()

bool VerifyToastGroup()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.Group() != winrt::hstring{ L"" })
{
Expand All @@ -283,7 +283,7 @@ bool VerifyToastProgressDataFromToast()
/*
* TODO: Uncomment once ToastProgressData has been implemented
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };
winrt::ToastProgressData progressData{};
progressData.Status(L"SomeStatus");
Expand All @@ -305,15 +305,15 @@ bool VerifyToastProgressDataFromToast()

bool VerifyToastExpirationTime()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.ExpirationTime() != winrt::DateTime{})
{
return false;
}

winrt::DateTime expirationTime = winrt::clock::now();
expirationTime += winrt::TimeSpan(std::chrono::seconds(10));
winrt::DateTime expirationTime{ winrt::clock::now() };
expirationTime += winrt::TimeSpan{ std::chrono::seconds(10) };

toast.ExpirationTime(expirationTime);
if (toast.ExpirationTime() != expirationTime)
Expand All @@ -326,7 +326,7 @@ bool VerifyToastExpirationTime()

bool VerifyToastPriority()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.Priority() != winrt::ToastPriority::Default)
{
Expand All @@ -344,7 +344,7 @@ bool VerifyToastPriority()

bool VerifyToastSuppressDisplay()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.SuppressDisplay())
{
Expand All @@ -362,7 +362,7 @@ bool VerifyToastSuppressDisplay()

bool VerifyToastExpiresOnReboot()
{
winrt::ToastNotification toast = GetToastNotification();
winrt::ToastNotification toast{ GetToastNotification() };

if (toast.ExpiresOnReboot())
{
Expand Down

0 comments on commit d4859d4

Please sign in to comment.