From 91ecae0a4522b34ced2ac667d4efca0bdb449827 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 31 Mar 2020 08:15:54 +1100 Subject: Pass argument as unique_ptr to show transfer of ownership. Add const and noexcept. --- 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 2098fcb6f..8e3a86c15 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -620,7 +620,7 @@ void LexState::SetInstance(ILexer5 *instance_) { LexState *ScintillaBase::DocumentLexState() { if (!pdoc->GetLexInterface()) { - pdoc->SetLexInterface(new LexState(pdoc)); + pdoc->SetLexInterface(std::make_unique(pdoc)); } return dynamic_cast(pdoc->GetLexInterface()); } -- cgit v1.2.3