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. --- src/Editor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Editor.h') diff --git a/src/Editor.h b/src/Editor.h index 9a86d12e1..c08c8288e 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -643,7 +643,7 @@ private: public: AutoSurface(const Editor *ed, int technology = -1) { if (ed->wMain.GetID()) { - surf.reset(Surface::Allocate(technology != -1 ? technology : ed->technology)); + surf = Surface::Allocate(technology != -1 ? technology : ed->technology); surf->Init(ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); @@ -652,7 +652,7 @@ public: } AutoSurface(SurfaceID sid, Editor *ed, int technology = -1) { if (ed->wMain.GetID()) { - surf.reset(Surface::Allocate(technology != -1 ? technology : ed->technology)); + surf = Surface::Allocate(technology != -1 ? technology : ed->technology); surf->Init(sid, ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); -- cgit v1.2.3