summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-03 13:59:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-07 08:31:14 +0200
commita13a8f3e467680fe4ad014c712ce81ff0e6719bf (patch)
treece9bdc8eb267f4cb6b3b38d8b348177cd8884a01 /connectivity
parent0ce677434f5eb1ff388d0f33306b9dba9b5beaab (diff)
loplugin:useuniqueptr in OCommonStatement
Change-Id: I79f1322dff544ae6251a5a20e4553c6a2baa6fda Reviewed-on: https://gerrit.libreoffice.org/53866 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/mork/MPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx6
-rw-r--r--connectivity/source/drivers/mork/MStatement.hxx2
3 files changed, 5 insertions, 5 deletions
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;