Skip to content

Commit 57d19dd

Browse files
committed
Removing redundant if conditional branch
1 parent 34f56a2 commit 57d19dd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/wintoastlib.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ namespace DllImporter {
107107
if (initialized()) {
108108
return S_OK;
109109
}
110-
110+
111111
LibShell32 = LoadLibraryW(L"SHELL32.DLL");
112112
HRESULT hr =
113113
loadFunctionFromLibrary(LibShell32, "SetCurrentProcessExplicitAppUserModelID", SetCurrentProcessExplicitAppUserModelID);
@@ -861,13 +861,11 @@ INT64 WinToast::showToast(_In_ WinToastTemplate const& toast, _In_ IWinToastHand
861861
}
862862

863863
if (SUCCEEDED(hr)) {
864-
if (SUCCEEDED(hr)) {
865-
_buffer.emplace(id, NotifyData(notification, activatedToken, dismissedToken, failedToken));
866-
DEBUG_MSG("xml: " << Util::AsString(xmlDocument));
867-
hr = notifier->Show(notification.Get());
868-
if (FAILED(hr)) {
869-
setError(error, WinToastError::NotDisplayed);
870-
}
864+
_buffer.emplace(id, NotifyData(notification, activatedToken, dismissedToken, failedToken));
865+
DEBUG_MSG("xml: " << Util::AsString(xmlDocument));
866+
hr = notifier->Show(notification.Get());
867+
if (FAILED(hr)) {
868+
setError(error, WinToastError::NotDisplayed);
871869
}
872870
}
873871
}

0 commit comments

Comments
 (0)