diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 15:21:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-21 08:21:13 +0200 |
commit | 10433ad91f29e5ef316ab2e8fd2d4713a3217a41 (patch) | |
tree | c433fb931c7a65541cdb719891e7217b5c07ab7c /forms/source/xforms | |
parent | 9375d1bb04baf4e2f4911195b1fbc47496a584c2 (diff) |
loplugin:useuniqueptr in PropertySetBase
Change-Id: I82af72050329bd206c4e796334a3ac9bc1177768
Reviewed-on: https://gerrit.libreoffice.org/56187
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source/xforms')
-rw-r--r-- | forms/source/xforms/propertysetbase.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/propertysetbase.hxx | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index 4d426815fc98..393182c2f8f1 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -44,13 +44,11 @@ PropertyAccessorBase::~PropertyAccessorBase() } PropertySetBase::PropertySetBase( ) - :m_pProperties( nullptr ) { } PropertySetBase::~PropertySetBase( ) { - DELETEZ( m_pProperties ); } cppu::IPropertyArrayHelper& SAL_CALL PropertySetBase::getInfoHelper() @@ -58,7 +56,7 @@ cppu::IPropertyArrayHelper& SAL_CALL PropertySetBase::getInfoHelper() if ( !m_pProperties ) { OSL_ENSURE( !m_aProperties.empty(), "PropertySetBase::getInfoHelper: no registered properties!" ); - m_pProperties = new cppu::OPropertyArrayHelper( &m_aProperties[0], m_aProperties.size(), false ); + m_pProperties.reset(new cppu::OPropertyArrayHelper( &m_aProperties[0], m_aProperties.size(), false )); } return *m_pProperties; } diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx index 5627055a8a61..409a4a6ebc8c 100644 --- a/forms/source/xforms/propertysetbase.hxx +++ b/forms/source/xforms/propertysetbase.hxx @@ -181,7 +181,7 @@ private: typedef ::std::map< const sal_Int32, css::uno::Any > PropertyValueCache; PropertyArray m_aProperties; - cppu::IPropertyArrayHelper* m_pProperties; + std::unique_ptr<cppu::IPropertyArrayHelper> m_pProperties; PropertyAccessors m_aAccessors; PropertyValueCache m_aCache; |