summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold Dumas <arnold@dumas.at>2016-08-19 09:27:16 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-19 08:44:09 +0000
commite420085f6f106cd78b70ffc3abd02e32123230f4 (patch)
tree795cdfe87cb4efc57dd5596e93987c11b85757bb
parent514c88a33bcbe5deae00a6b9e17a89b0044a8d2a (diff)
tdf#89329: use unique_ptr for pImpl in datasourcehandling
Change-Id: Ib019d26a72d234245cc1a7322bfbfb11705f29d3 Reviewed-on: https://gerrit.libreoffice.org/28231 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx4
-rw-r--r--extensions/source/abpilot/datasourcehandling.hxx2
2 files changed, 2 insertions, 4 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index ac9cbe69488c..3b809697bdde 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -333,8 +333,7 @@ namespace abp
{
if( this != &_rSource )
{
- delete m_pImpl;
- m_pImpl = new ODataSourceImpl( *_rSource.m_pImpl );
+ m_pImpl.reset( new ODataSourceImpl( *_rSource.m_pImpl ) );
}
return *this;
}
@@ -348,7 +347,6 @@ namespace abp
ODataSource::~ODataSource( )
{
- delete m_pImpl;
}
void ODataSource::store(const AddressSettings& rSettings)
diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx
index 97c044150a9c..65a4398c6846 100644
--- a/extensions/source/abpilot/datasourcehandling.hxx
+++ b/extensions/source/abpilot/datasourcehandling.hxx
@@ -96,7 +96,7 @@ namespace abp
class ODataSource
{
private:
- ODataSourceImpl* m_pImpl;
+ std::unique_ptr<ODataSourceImpl> m_pImpl;
public: