diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-11 14:19:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-23 06:59:17 +0000 |
commit | 98e4013c22c4ce63090a575e698cc2af82925e6b (patch) | |
tree | 571d99c39420e929cd43e0365354da1aced03e68 /hwpfilter | |
parent | Revert "Revert "use rtl::Reference in SwPostItField"" (diff) | |
download | core-98e4013c22c4ce63090a575e698cc2af82925e6b.tar.gz core-98e4013c22c4ce63090a575e698cc2af82925e6b.zip |
new loplugin useuniqueptr
Change-Id: Ic7a8b32887c968d86568e4cfad7ddd1f4da7c73f
Reviewed-on: https://gerrit.libreoffice.org/33339
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 3 | ||||
-rw-r--r-- | hwpfilter/source/hwpreader.hxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index f353bd7ea6ef..68388d12b3c4 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -108,13 +108,12 @@ struct HwpReaderPrivate HwpReader::HwpReader() { mxList = new AttributeListImpl; - d = new HwpReaderPrivate; + d.reset( new HwpReaderPrivate ); } HwpReader::~HwpReader() { - delete d; } extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(const OUString &rURL) diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index d1dbd16d9935..c44a0c37abd6 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX #define INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX + #include <errno.h> #include <stdio.h> #include <string.h> @@ -40,6 +41,7 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weak.hxx> +#include <memory> using namespace ::cppu; using namespace ::com::sun::star::lang; @@ -92,7 +94,7 @@ private: Reference< XDocumentHandler > m_rxDocumentHandler; rtl::Reference<AttributeListImpl> mxList; HWPFile hwpfile; - HwpReaderPrivate *d; + std::unique_ptr<HwpReaderPrivate> d; private: /* -------- Document Parsing --------- */ void makeMeta(); |