diff options
author | Neil <nyamatongwe@gmail.com> | 2020-03-31 08:15:54 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-03-31 08:15:54 +1100 |
commit | 91ecae0a4522b34ced2ac667d4efca0bdb449827 (patch) | |
tree | 9c370e0f5421522920f2d6738118d930c1cff3b0 /src/ScintillaBase.cxx | |
parent | 30748b957f1fbce6c79c7ac48e8b377cd6c7fd5a (diff) | |
download | scintilla-mirror-91ecae0a4522b34ced2ac667d4efca0bdb449827.tar.gz |
Pass argument as unique_ptr to show transfer of ownership. Add const and noexcept.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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<LexState>(pdoc)); } return dynamic_cast<LexState *>(pdoc->GetLexInterface()); } |