Use nullptr comparisons
This commit is contained in:
parent
e797eb5ca3
commit
45dbbfdfe9
1 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ void NotifyIcon::DisplayBalloon(HICON icon,
|
||||||
void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
|
void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
|
||||||
ui::SimpleMenuModel* menu_model) {
|
ui::SimpleMenuModel* menu_model) {
|
||||||
// Returns if context menu isn't set.
|
// Returns if context menu isn't set.
|
||||||
if (!menu_model && !menu_model_)
|
if (menu_model == nullptr && menu_model_ == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set our window as the foreground window, so the context menu closes when
|
// 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());
|
rect.set_origin(gfx::Screen::GetScreen()->GetCursorScreenPoint());
|
||||||
|
|
||||||
views::MenuRunner menu_runner(
|
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);
|
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS);
|
||||||
ignore_result(menu_runner.RunMenuAt(
|
ignore_result(menu_runner.RunMenuAt(
|
||||||
NULL, NULL, rect, views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE));
|
NULL, NULL, rect, views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue