use unique_ptr for pImpl in writerperfect/

Change-Id: I23ab4d214ed01073f26cbbf2e88732ccde4ebc10
This commit is contained in:
Noel Grandin 2015-11-17 08:51:46 +02:00
parent 6ceb4e2d7a
commit b4bd157d0f
4 changed files with 4 additions and 8 deletions

View File

@ -11,10 +11,9 @@
#define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX #define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
#include <librevenge-stream/librevenge-stream.h> #include <librevenge-stream/librevenge-stream.h>
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <writerperfectdllapi.h> #include <writerperfectdllapi.h>
#include <memory>
namespace com namespace com
{ {
@ -57,7 +56,7 @@ public:
virtual bool isEnd() override; virtual bool isEnd() override;
private: private:
Impl *m_pImpl; std::unique_ptr<Impl> m_pImpl;
}; };
} }

View File

@ -11,10 +11,9 @@
#define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX #define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX
#include <librevenge-stream/librevenge-stream.h> #include <librevenge-stream/librevenge-stream.h>
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <writerperfectdllapi.h> #include <writerperfectdllapi.h>
#include <memory>
namespace com namespace com
{ {
@ -55,7 +54,7 @@ public:
virtual bool isEnd() override; virtual bool isEnd() override;
private: private:
WPXSvInputStreamImpl *mpImpl; std::unique_ptr<WPXSvInputStreamImpl> mpImpl;
}; };
} }

View File

@ -111,7 +111,6 @@ DirectoryStream::DirectoryStream(const com::sun::star::uno::Reference<com::sun::
DirectoryStream::~DirectoryStream() DirectoryStream::~DirectoryStream()
{ {
delete m_pImpl;
} }
DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent) DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Reference<com::sun::star::ucb::XContent> &xContent)

View File

@ -817,7 +817,6 @@ WPXSvInputStream::WPXSvInputStream(Reference< XInputStream > xStream) :
WPXSvInputStream::~WPXSvInputStream() WPXSvInputStream::~WPXSvInputStream()
{ {
delete mpImpl;
} }
#define BUFFER_MAX 65536 #define BUFFER_MAX 65536