diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-03 14:01:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-07 08:31:25 +0200 |
commit | 0e2d60f8565c2619807900244b3238ea23c4d962 (patch) | |
tree | f5ae49e39acb838bae3b835d4efce9fc238cf2ba /connectivity | |
parent | a13a8f3e467680fe4ad014c712ce81ff0e6719bf (diff) |
loplugin:useuniqueptr in OResultSet
Change-Id: I8fb228a34710b73ed387458dab882e085125925b
Reviewed-on: https://gerrit.libreoffice.org/53867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/file/FResultSet.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/inc/file/FResultSet.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index f2610657bf07..5d5abc50afb1 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -149,7 +149,7 @@ void OResultSet::disposing() m_pTable.clear(); m_pFileSet = nullptr; - DELETEZ(m_pSortIndex); + m_pSortIndex.reset(); if(m_aInsertRow.is()) m_aInsertRow->get().clear(); @@ -1147,7 +1147,7 @@ void OResultSet::sortRows() ++i; } - m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending); + m_pSortIndex.reset(new OSortIndex(eKeyType,m_aOrderbyAscending)); while ( ExecuteRow( IResultSetHelper::NEXT, 1, false ) ) { @@ -1161,7 +1161,7 @@ void OResultSet::sortRows() // create sorted Keyset m_pFileSet = nullptr; m_pFileSet = m_pSortIndex->CreateKeySet(); - DELETEZ(m_pSortIndex); + m_pSortIndex.reset(); // now access to a sorted set is possible via Index } diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index fae15e2c3bf2..d223c0909d4e 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -86,7 +86,7 @@ namespace connectivity OKeySet::Vector::iterator m_aFileSetIter; - OSortIndex* m_pSortIndex; + std::unique_ptr<OSortIndex> m_pSortIndex; ::rtl::Reference<connectivity::OSQLColumns> m_xColumns; // this are the select columns ::rtl::Reference<connectivity::OSQLColumns> m_xParamColumns; rtl::Reference<OFileTable> m_pTable; |