diff options
author | Arnaud Versini <arnaud.versini@libreoffice.org> | 2020-11-05 18:14:34 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-05 20:39:26 +0100 |
commit | 8ad514c6653c063f487ad40b4dbcd57a86e78e41 (patch) | |
tree | f7b363607b91ec14a3508dcf8c2601c7d47a644f /basic/source/uno | |
parent | ac6df04b5c5a7c227fec3b8897c79be5e99cbe01 (diff) |
BASIC : use std::make_unique instead of std::unique_ptr ( new ... )
Change-Id: Ic907f4711685539b6a89411e704845617cc5f04d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105375
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/uno')
-rw-r--r-- | basic/source/uno/namecont.cxx | 4 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 58401206fc4d..ec112b466f3f 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -795,7 +795,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, source.sSystemId = aFileName; // start parsing - std::unique_ptr< ::xmlscript::LibDescriptorArray> pLibArray(new ::xmlscript::LibDescriptorArray()); + auto pLibArray = std::make_unique<::xmlscript::LibDescriptorArray> ( ); try { @@ -1845,7 +1845,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto int iArray = 0; pName = aNames.getConstArray(); ::xmlscript::LibDescriptor aLibDescriptorForExtensionLibs; - std::unique_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); + auto pLibArray = std::make_unique< ::xmlscript::LibDescriptorArray > ( nLibsToSave ); for( ; pName != pNamesEnd; ++pName ) { SfxLibrary* pImplLib = getImplLib( *pName ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 070d3cbbd74b..652a7fbc3129 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -324,7 +324,7 @@ void SfxScriptLibraryContainer::importFromOldStorage( const OUString& aFile ) auto xStorage = tools::make_ref<SotStorage>( false, aFile ); if( xStorage->GetError() == ERRCODE_NONE ) { - std::unique_ptr<BasicManager> pBasicManager(new BasicManager( *xStorage, aFile )); + auto pBasicManager = std::make_unique<BasicManager> ( *xStorage, aFile ); // Set info LibraryContainerInfo aInfo( this, nullptr, static_cast< OldBasicPassword* >( this ) ); |