Kaydet (Commit) 18c27429 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in mysqlc

Change-Id: Ife3a044beae03c7623c1bd3c2ef6ce5595f97cca
Reviewed-on: https://gerrit.libreoffice.org/53223Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cd0a8777
......@@ -67,8 +67,7 @@ OCommonStatement::~OCommonStatement()
void OCommonStatement::disposeResultSet()
{
// free the cursor if alive
delete cppStatement;
cppStatement = nullptr;
cppStatement.reset();
}
void OCommonStatement::disposing()
......@@ -78,7 +77,7 @@ void OCommonStatement::disposing()
disposeResultSet();
m_xConnection.clear();
delete cppStatement;
cppStatement.reset();
OCommonStatement_IBase::disposing();
}
......
......@@ -66,7 +66,7 @@ namespace connectivity
protected:
rtl::Reference<OConnection> m_xConnection; // The owning Connection object
sql::Statement *cppStatement;
std::unique_ptr<sql::Statement> cppStatement;
protected:
void disposeResultSet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment