connectivity/source/drivers/file/FResultSet.cxx | 6 +++--- connectivity/source/drivers/mork/MPreparedStatement.cxx | 2 +- connectivity/source/drivers/mork/MStatement.cxx | 6 +++--- connectivity/source/drivers/mork/MStatement.hxx | 2 +- connectivity/source/inc/file/FResultSet.hxx | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 0e2d60f8565c2619807900244b3238ea23c4d962 Author: Noel Grandin <[email protected]> Date: Thu May 3 14:01:03 2018 +0200 loplugin:useuniqueptr in OResultSet Change-Id: I8fb228a34710b73ed387458dab882e085125925b Reviewed-on: https://gerrit.libreoffice.org/53867 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> 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; commit a13a8f3e467680fe4ad014c712ce81ff0e6719bf Author: Noel Grandin <[email protected]> Date: Thu May 3 13:59:47 2018 +0200 loplugin:useuniqueptr in OCommonStatement Change-Id: I79f1322dff544ae6251a5a20e4553c6a2baa6fda Reviewed-on: https://gerrit.libreoffice.org/53866 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx index 81626de6b482..30c7fbc4a5c4 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx @@ -429,7 +429,7 @@ void OPreparedStatement::describeColumn(OSQLParseNode const * _pParameter, void OPreparedStatement::describeParameter() { std::vector< OSQLParseNode*> aParseNodes; - scanParameter(m_pParseTree,aParseNodes); + scanParameter(m_pParseTree.get(), aParseNodes); if(!aParseNodes.empty()) { m_xParamColumns = new OSQLColumns(); diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx index 425eef8b898d..66e237a3ad90 100644 --- a/connectivity/source/drivers/mork/MStatement.cxx +++ b/connectivity/source/drivers/mork/MStatement.cxx @@ -79,7 +79,7 @@ void OCommonStatement::disposing() m_pConnection.clear(); m_pSQLIterator->dispose(); - delete m_pParseTree; + m_pParseTree.reset(); OCommonStatement_IBASE::disposing(); } @@ -114,11 +114,11 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql { OUString aErr; - m_pParseTree = m_aParser.parseTree(aErr,sql); + m_pParseTree.reset( m_aParser.parseTree(aErr,sql) ); if(m_pParseTree) { - m_pSQLIterator->setParseTree(m_pParseTree); + m_pSQLIterator->setParseTree(m_pParseTree.get()); m_pSQLIterator->traverseAll(); const OSQLTables& rTabs = m_pSQLIterator->getTables(); diff --git a/connectivity/source/drivers/mork/MStatement.hxx b/connectivity/source/drivers/mork/MStatement.hxx index 71d980468ee5..1f9d5f410ebe 100644 --- a/connectivity/source/drivers/mork/MStatement.hxx +++ b/connectivity/source/drivers/mork/MStatement.hxx @@ -68,7 +68,7 @@ namespace connectivity std::shared_ptr< ::connectivity::OSQLParseTreeIterator > m_pSQLIterator; - connectivity::OSQLParseNode* m_pParseTree; + std::unique_ptr<connectivity::OSQLParseNode> m_pParseTree; std::vector<sal_Int32> m_aColMapping; std::vector<sal_Int32> m_aOrderbyColumnNumber; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
