refactor: NativeWindow::Create() returns a unique_ptr (#43576)

refactor: NativeWindow::Create() returns a unique_ptr
This commit is contained in:
Charles Kerr 2024-09-06 11:59:32 -05:00 committed by GitHub
parent fe0d4274e2
commit 18b1b33adc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 10 deletions

View file

@ -1814,9 +1814,10 @@ std::optional<gfx::Rect> NativeWindowMac::GetWindowControlsOverlayRect() {
}
// static
NativeWindow* NativeWindow::Create(const gin_helper::Dictionary& options,
NativeWindow* parent) {
return new NativeWindowMac(options, parent);
std::unique_ptr<NativeWindow> NativeWindow::Create(
const gin_helper::Dictionary& options,
NativeWindow* parent) {
return std::make_unique<NativeWindowMac>(options, parent);
}
} // namespace electron