From 8898dd74337c8fb7ac76e157f9afee38ffbe1438 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sun, 5 Apr 2020 16:04:05 -0400 Subject: Backport: Pass argument as unique_ptr to show transfer of ownership. Add const and noexcept. Backport of changeset 8106:f26e186e80a9. --- src/ScintillaBase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 0975028f3..082cb82d5 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -615,7 +615,7 @@ LexState::~LexState() { LexState *ScintillaBase::DocumentLexState() { if (!pdoc->GetLexInterface()) { - pdoc->SetLexInterface(new LexState(pdoc)); + pdoc->SetLexInterface(Sci::make_unique(pdoc)); } return dynamic_cast(pdoc->GetLexInterface()); } -- cgit v1.2.3