diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-21 11:22:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-21 18:51:34 +0100 |
commit | eef4268f05ca7771651d48ab661276981ef7d573 (patch) | |
tree | 7b3e6c845c197c8b402a2d534ce8ac45628ed274 /xmlhelp | |
parent | 725b5863832ef712d05b3cd49b77d447d84b80bb (diff) |
use unique_ptr in xmlhelp
Change-Id: Ic49bb1bc6591735562b0b23d821202bab00ceba2
Reviewed-on: https://gerrit.libreoffice.org/65533
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index e59ddae7bea5..e12ae7930853 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -808,15 +808,15 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar, Sequence< Any > aArguments( 2 ); - XInputStream_impl* p = new XInputStream_impl( zipFile ); + std::unique_ptr<XInputStream_impl> p(new XInputStream_impl( zipFile )); if( p->CtorSuccess() ) { - Reference< XInputStream > xInputStream( p ); + Reference< XInputStream > xInputStream( p.release() ); aArguments[ 0 ] <<= xInputStream; } else { - delete p; + p.reset(); aArguments[ 0 ] <<= zipFile; } |