From 6af47b53d52c29474bfc551700f8394dbf1dbc04 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 18 Mar 2021 19:50:34 +1100 Subject: Use unique_ptr for CaseFolderForEncoding to show transfer of ownership. --- src/Document.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index 5f80ee50b..63b90d69f 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1971,8 +1971,8 @@ bool Document::HasCaseFolder() const noexcept { return pcf != nullptr; } -void Document::SetCaseFolder(CaseFolder *pcf_) noexcept { - pcf.reset(pcf_); +void Document::SetCaseFolder(std::unique_ptr pcf_) noexcept { + pcf = std::move(pcf_); } Document::CharacterExtracted Document::ExtractCharacter(Sci::Position position) const noexcept { -- cgit v1.2.3