summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 16:23:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 10:16:35 +0200
commitf063d364050b2595bc3b29f416cd365b13b809fe (patch)
treebef4e95982d37701a27180a49b9401356c2ebc28 /svtools/source
parentbfd81eed4ce4ee262437938199615ff6cc2c52a0 (diff)
loplugin:useuniqueptr in TransferDataContainer_Impl
Change-Id: I605e2d8ab97c74bfc00928921cddab513ac8c23d
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/misc/transfer2.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 680cb5fa60c9..936ccb2301fe 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -320,19 +320,12 @@ struct TransferDataContainer_Impl
{
TDataCntnrEntryList aFmtList;
Link<sal_Int8,void> aFinshedLnk;
- INetBookmark* pBookmk;
- Graphic* pGrf;
+ std::unique_ptr<INetBookmark> pBookmk;
+ std::unique_ptr<Graphic> pGrf;
TransferDataContainer_Impl()
- : pBookmk( nullptr ), pGrf( nullptr )
{
}
-
- ~TransferDataContainer_Impl()
- {
- delete pBookmk;
- delete pGrf;
- }
};
@@ -402,7 +395,7 @@ bool TransferDataContainer::GetData(
void TransferDataContainer::CopyINetBookmark( const INetBookmark& rBkmk )
{
if( !pImpl->pBookmk )
- pImpl->pBookmk = new INetBookmark( rBkmk );
+ pImpl->pBookmk.reset( new INetBookmark( rBkmk ) );
else
*pImpl->pBookmk = rBkmk;
@@ -466,7 +459,7 @@ void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
return;
if( !pImpl->pGrf )
- pImpl->pGrf = new Graphic( rGrf );
+ pImpl->pGrf.reset( new Graphic( rGrf ) );
else
*pImpl->pGrf = rGrf;