diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-04 23:14:20 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-06 07:08:18 +0000 |
commit | 8a9559c59c0ee78cdab929b3e01fcd4bc9d569b2 (patch) | |
tree | 225db500e63a2f793a89f3d2f3395484da9475de /connectivity | |
parent | e41d9a9ef9579c1f31dbca988d27f8320146a334 (diff) |
tdf#89329: use unique_ptr for pImpl in TColumnHelper
Change-Id: I4a7594cb2a9424fddbd79e2b5d77431bf329eec9
Reviewed-on: https://gerrit.libreoffice.org/25903
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/TColumnsHelper.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 5d6fcf85e5b0..6cf821be8110 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -64,15 +64,12 @@ OColumnsHelper::OColumnsHelper( ::cppu::OWeakObject& _rParent ,const TStringVector &_rVector ,bool _bUseHardRef ) : OCollection(_rParent,_bCase,_rMutex,_rVector,false,_bUseHardRef) - ,m_pImpl(nullptr) ,m_pTable(nullptr) { } OColumnsHelper::~OColumnsHelper() { - delete m_pImpl; - m_pImpl = nullptr; } @@ -82,7 +79,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) Reference<XConnection> xConnection = m_pTable->getConnection(); if ( !m_pImpl ) - m_pImpl = new OColumnsHelperImpl(isCaseSensitive()); + m_pImpl.reset(new OColumnsHelperImpl(isCaseSensitive())); bool bQueryInfo = true; bool bAutoIncrement = false; |