Skip to content

Commit

Permalink
chore: replace _ASSERT with DCHECK in toast.cc (#13598)
Browse files Browse the repository at this point in the history
_ASSERT was triggering errors about unused values when in debug mode
  • Loading branch information
nornagon authored and codebytere committed Jul 10, 2018
1 parent bc2ea0e commit 3a58545
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions brightray/browser/win/win32_desktop_notifications/toast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <uxtheme.h>
#include <windowsx.h>
#include <algorithm>
#include "base/logging.h"
#include "brightray/browser/win/win32_desktop_notifications/common.h"

#pragma comment(lib, "msimg32.lib")
Expand Down Expand Up @@ -566,7 +567,7 @@ void DesktopNotificationController::Toast::UpdateBufferSize() {
auto b1 = UpdateLayeredWindowIndirect(hwnd_, &ulw);
ulw.prcDirty = &dirty2;
auto b2 = UpdateLayeredWindowIndirect(hwnd_, &ulw);
_ASSERT(b1 && b2);
DCHECK(b1 && b2);
}

return;
Expand Down Expand Up @@ -745,14 +746,14 @@ HDWP DesktopNotificationController::Toast::Animate(HDWP hdwp,
}

void DesktopNotificationController::Toast::StartEaseIn() {
_ASSERT(!ease_in_active_);
DCHECK(!ease_in_active_);
ease_in_start_ = GetTickCount();
ease_in_active_ = true;
data_->controller->StartAnimation();
}

void DesktopNotificationController::Toast::StartEaseOut() {
_ASSERT(!ease_out_active_);
DCHECK(!ease_out_active_);
ease_out_start_ = GetTickCount();
ease_out_active_ = true;
data_->controller->StartAnimation();
Expand Down

0 comments on commit 3a58545

Please sign in to comment.