summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-07 09:59:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-08 17:50:13 +0200
commitcbf8f81156840bffff524d74d02d70a5530a0a37 (patch)
tree44ff68cb196965b8eab076933fa662cb29838d5d /xmlhelp/source/cxxhelp/provider/urlparameter.cxx
parent4aecbe996349c7767ba3fb1e81db2ef6f94d39ba (diff)
loplugin:useuniqueptr in xmlhelp
Change-Id: I8a407e0492adf61e1d815cadd5da0a1623c2b23b Reviewed-on: https://gerrit.libreoffice.org/60191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp/source/cxxhelp/provider/urlparameter.cxx')
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 8707e3a478b2..85e4cb4051ad 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -338,7 +338,7 @@ void URLParameter::open( const Reference< XOutputStream >& xDataSink )
return;
// a standard document or else an active help text, plug in the new input stream
- InputStreamTransformer* p = new InputStreamTransformer( this,m_pDatabases,isRoot() );
+ std::unique_ptr<InputStreamTransformer> p(new InputStreamTransformer( this,m_pDatabases,isRoot() ));
try
{
xDataSink->writeBytes( Sequence< sal_Int8 >( reinterpret_cast<const sal_Int8*>(p->getData().getStr()), p->getData().getLength() ) );
@@ -346,7 +346,7 @@ void URLParameter::open( const Reference< XOutputStream >& xDataSink )
catch( const Exception& )
{
}
- delete p;
+ p.reset();
xDataSink->closeOutput();
}