summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/api/TableDeco.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 09:31:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 09:04:59 +0000
commit2abe0df63c59637ea1b00703458edf71dff8167c (patch)
treee97b3820a3ff20a2b6b57491180973dac63cbbad /dbaccess/source/core/api/TableDeco.cxx
parent4883355c31dff1f3d89f0d99d76837e0b72131d3 (diff)
new loplugin: useuniqueptr: dbaccess
Change-Id: I2421cd032066c41f80e8b6560c8c4a73f26edeb2 Reviewed-on: https://gerrit.libreoffice.org/33151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/core/api/TableDeco.cxx')
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 643ed9349ad3..54c82bc8b542 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -75,7 +75,6 @@ ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnect
ODBTableDecorator::~ODBTableDecorator()
{
- delete m_pColumns;
}
Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeException, std::exception)
@@ -453,7 +452,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException,
if(!m_pColumns)
refreshColumns();
- return m_pColumns;
+ return m_pColumns.get();
}
OUString SAL_CALL ODBTableDecorator::getName() throw(RuntimeException, std::exception)
@@ -577,7 +576,7 @@ void ODBTableDecorator::refreshColumns()
OContainerMediator* pMediator = new OContainerMediator( pCol, m_xColumnDefinitions );
m_xColumnMediator = pMediator;
pCol->setMediator( pMediator );
- m_pColumns = pCol;
+ m_pColumns.reset( pCol );
}
else
m_pColumns->reFill(aVector);