From 402e089842d5aa2bb3774a665e26c42dc91fa5b4 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 18 Mar 2021 19:39:42 +1100 Subject: Use unique_ptr for Surface::Allocate to show transfer of ownership. --- cocoa/PlatCocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index f2eee85c8..4eb3bfd1b 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1258,8 +1258,8 @@ void SurfaceImpl::SetDBCSMode(int codePage_) { void SurfaceImpl::SetBidiR2L(bool) { } -Surface *Surface::Allocate(int) { - return new SurfaceImpl(); +std::unique_ptr Surface::Allocate(int) { + return std::make_unique(); } //----------------- Window ------------------------------------------------------------------------- -- cgit v1.2.3