diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 09:06:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 09:06:38 +0100 |
commit | 9f5c54856fe24f5ada639f7eaff2cfbf744c8cfe (patch) | |
tree | 6afee44049440e2c12f45195dae84392523a45d5 /ucb | |
parent | 6a16775c7828358ba0bf6ecdbd785991c06036f7 (diff) |
loplugin:useuniqueptr
Change-Id: I5091c2b4550dee1f0b602a5337e17fe78b9d07f9
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontentcaps.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.hxx | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 08e95e2fa051..d8e19447a31b 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/ucb/LockEntry.hpp> +#include <o3tl/make_unique.hxx> #include "webdavcontent.hxx" #include "webdavprovider.hxx" #include "DAVSession.hxx" @@ -52,7 +53,7 @@ bool ContentProvider::getProperty( osl::MutexGuard aGuard( m_aMutex ); if ( !m_pProps ) { - m_pProps = new PropertyMap; + m_pProps = o3tl::make_unique<PropertyMap>(); // Fill map of known properties... diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index 0cca80f5bc95..cbc7cc32ec32 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -37,17 +37,14 @@ using namespace http_dav_ucp; ContentProvider::ContentProvider( const uno::Reference< uno::XComponentContext >& rContext ) : ::ucbhelper::ContentProviderImplHelper( rContext ), - m_xDAVSessionFactory( new DAVSessionFactory() ), - m_pProps( nullptr ) + m_xDAVSessionFactory( new DAVSessionFactory() ) { } // virtual ContentProvider::~ContentProvider() -{ - delete m_pProps; -} +{} // XInterface methods. diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index 3231eb239183..2672b262383a 100644 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.hxx @@ -21,6 +21,10 @@ #ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_WEBDAVPROVIDER_HXX #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_WEBDAVPROVIDER_HXX +#include <sal/config.h> + +#include <memory> + #include <rtl/ref.hxx> #include <com/sun/star/beans/Property.hpp> #include "DAVSessionFactory.hxx" @@ -62,7 +66,7 @@ namespace http_dav_ucp { class ContentProvider : public ::ucbhelper::ContentProviderImplHelper { rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory; - PropertyMap * m_pProps; + std::unique_ptr<PropertyMap> m_pProps; public: explicit ContentProvider( const css::uno::Reference< css::uno::XComponentContext >& rContext ); |