[Libreoffice-commits] core.git: filter/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Jun 12 06:24:10 UTC 2018
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 5 +----
filter/source/xsltdialog/xmlfiltertestdialog.hxx | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
New commits:
commit af66cd6e0809982d61b962fbcf2042981084f770
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jun 4 15:07:14 2018 +0200
loplugin:useuniqueptr in XMLFilterTestDialog
Change-Id: Id31ea8cae066dab5715c90a3c280fccdaf06fe59
Reviewed-on: https://gerrit.libreoffice.org/55522
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 800a51a10ec2..c4c08e86f64b 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -181,14 +181,11 @@ XMLFilterTestDialog::~XMLFilterTestDialog()
{
OSL_FAIL( "XMLFilterTestDialog::~XMLFilterTestDialog exception caught!" );
}
-
- delete m_xFilterInfo;
}
void XMLFilterTestDialog::test( const filter_info_impl& rFilterInfo )
{
- delete m_xFilterInfo;
- m_xFilterInfo = new filter_info_impl( rFilterInfo );
+ m_xFilterInfo.reset(new filter_info_impl( rFilterInfo ));
m_sImportRecentFile.clear();
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
index 28f95dce06f8..f8ae67c367c7 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
@@ -60,7 +60,7 @@ private:
OUString m_sImportRecentFile;
OUString m_sExportRecentFile;
- filter_info_impl* m_xFilterInfo;
+ std::unique_ptr<filter_info_impl> m_xFilterInfo;
OUString m_sDialogTitle;
std::unique_ptr<weld::Widget> m_xExport;
More information about the Libreoffice-commits
mailing list