aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-18 19:39:42 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-18 19:39:42 +1100
commit402e089842d5aa2bb3774a665e26c42dc91fa5b4 (patch)
tree58304e9b27215782eec1a5c38e0636b2a18bafef /src/Editor.h
parent43c4b61bdd3669c2cc08d50f10401f0b04befcc9 (diff)
downloadscintilla-mirror-402e089842d5aa2bb3774a665e26c42dc91fa5b4.tar.gz
Use unique_ptr for Surface::Allocate to show transfer of ownership.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h4
1 files changed, 2 insertions, 2 deletions
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());