refactor: NotificationPresenter::Create() returns a std::unique_ptr<> (#43804)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
78ede09ecd
commit
3ee3844bdb
5 changed files with 14 additions and 14 deletions
|
@ -10,10 +10,10 @@
|
|||
namespace electron {
|
||||
|
||||
// static
|
||||
NotificationPresenter* NotificationPresenter::Create() {
|
||||
if (!LibnotifyNotification::Initialize())
|
||||
return nullptr;
|
||||
return new NotificationPresenterLinux;
|
||||
std::unique_ptr<NotificationPresenter> NotificationPresenter::Create() {
|
||||
if (LibnotifyNotification::Initialize())
|
||||
return std::make_unique<NotificationPresenterLinux>();
|
||||
return {};
|
||||
}
|
||||
|
||||
NotificationPresenterLinux::NotificationPresenterLinux() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue