diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-18 19:39:42 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-18 19:39:42 +1100 |
commit | 402e089842d5aa2bb3774a665e26c42dc91fa5b4 (patch) | |
tree | 58304e9b27215782eec1a5c38e0636b2a18bafef /cocoa | |
parent | 43c4b61bdd3669c2cc08d50f10401f0b04befcc9 (diff) | |
download | scintilla-mirror-402e089842d5aa2bb3774a665e26c42dc91fa5b4.tar.gz |
Use unique_ptr for Surface::Allocate to show transfer of ownership.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/PlatCocoa.mm | 4 |
1 files changed, 2 insertions, 2 deletions
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> Surface::Allocate(int) { + return std::make_unique<SurfaceImpl>(); } //----------------- Window ------------------------------------------------------------------------- |