refactor: NotificationPresenter::Create() returns a std::unique_ptr<> (#43805)

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:
trop[bot] 2024-09-20 00:18:21 -05:00 committed by GitHub
parent 48805ee46e
commit 568314240e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View file

@ -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;