From b4bd157d0fffcd83e7461de35ee9105b53d21314 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 17 Nov 2015 08:51:46 +0200 Subject: [PATCH] use unique_ptr for pImpl in writerperfect/ Change-Id: I23ab4d214ed01073f26cbbf2e88732ccde4ebc10 --- writerperfect/inc/DirectoryStream.hxx | 5 ++--- writerperfect/inc/WPXSvInputStream.hxx | 5 ++--- writerperfect/source/common/DirectoryStream.cxx | 1 - writerperfect/source/common/WPXSvInputStream.cxx | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx index d35a78038228..6107af8aacfb 100644 --- a/writerperfect/inc/DirectoryStream.hxx +++ b/writerperfect/inc/DirectoryStream.hxx @@ -11,10 +11,9 @@ #define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX #include - #include - #include +#include namespace com { @@ -57,7 +56,7 @@ public: virtual bool isEnd() override; private: - Impl *m_pImpl; + std::unique_ptr m_pImpl; }; } diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx index 7de7455a6f03..e09f4f1005c1 100644 --- a/writerperfect/inc/WPXSvInputStream.hxx +++ b/writerperfect/inc/WPXSvInputStream.hxx @@ -11,10 +11,9 @@ #define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX #include - #include - #include +#include namespace com { @@ -55,7 +54,7 @@ public: virtual bool isEnd() override; private: - WPXSvInputStreamImpl *mpImpl; + std::unique_ptr mpImpl; }; } diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index cfbb043de7c9..868001540884 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -111,7 +111,6 @@ DirectoryStream::DirectoryStream(const com::sun::star::uno::Reference &xContent) diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx index 52d5824530ee..a0edca0611c8 100644 --- a/writerperfect/source/common/WPXSvInputStream.cxx +++ b/writerperfect/source/common/WPXSvInputStream.cxx @@ -817,7 +817,6 @@ WPXSvInputStream::WPXSvInputStream(Reference< XInputStream > xStream) : WPXSvInputStream::~WPXSvInputStream() { - delete mpImpl; } #define BUFFER_MAX 65536