Use nullptr comparisons

This commit is contained in:
Kevin Sawicki 2016-06-28 15:28:27 -07:00
parent e797eb5ca3
commit 45dbbfdfe9

View file

@ -134,7 +134,7 @@ void NotifyIcon::DisplayBalloon(HICON icon,
void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
ui::SimpleMenuModel* menu_model) {
// Returns if context menu isn't set.
if (!menu_model && !menu_model_)
if (menu_model == nullptr && menu_model_ == nullptr)
return;
// Set our window as the foreground window, so the context menu closes when
@ -148,7 +148,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
rect.set_origin(gfx::Screen::GetScreen()->GetCursorScreenPoint());
views::MenuRunner menu_runner(
menu_model ? menu_model : menu_model_,
menu_model != nullptr ? menu_model : menu_model_,
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS);
ignore_result(menu_runner.RunMenuAt(
NULL, NULL, rect, views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE));