Kaydet (Commit) 1649f489 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SvxRedlinTable

Change-Id: I9d2f7516f84351e5a1447a4a78398d8c33bd211a
Reviewed-on: https://gerrit.libreoffice.org/55224Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 51d93012
......@@ -41,6 +41,7 @@
#include <vcl/vclptr.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <memory>
namespace utl {
class SearchParam;
......@@ -126,7 +127,7 @@ private:
Color maEntryColor;
Image maEntryImage;
OUString maEntryString;
utl::TextSearch* pCommentSearcher;
std::unique_ptr<utl::TextSearch> pCommentSearcher;
Link<const SvSortData*,sal_Int32> aColCompareLink;
protected:
......
......@@ -113,8 +113,7 @@ SvxRedlinTable::~SvxRedlinTable()
void SvxRedlinTable::dispose()
{
delete pCommentSearcher;
pCommentSearcher = nullptr;
pCommentSearcher.reset();
SvSimpleTable::dispose();
}
......@@ -257,9 +256,7 @@ void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara )
{
if(pSearchPara!=nullptr)
{
delete pCommentSearcher;
pCommentSearcher=new utl::TextSearch(*pSearchPara, LANGUAGE_SYSTEM );
pCommentSearcher.reset(new utl::TextSearch(*pSearchPara, LANGUAGE_SYSTEM ));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment