From 30e8720a235014e96125f9142e5c0a7e628526ce Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Mar 2021 16:55:13 +1100 Subject: Use unique_ptr for ListBox::Allocate to show transfer of ownership. --- cocoa/PlatCocoa.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 0c6a96ed1..8e4323dca 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1960,9 +1960,8 @@ ListBox::ListBox() noexcept { ListBox::~ListBox() { } -ListBox *ListBox::Allocate() { - ListBoxImpl *lb = new ListBoxImpl(); - return lb; +std::unique_ptr ListBox::Allocate() { + return std::make_unique(); } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3