From ed27c49eea4e1abc69f588846dc99e3f81142d4e Mon Sep 17 00:00:00 2001 From: def Date: Wed, 4 Nov 2020 19:18:12 +0100 Subject: [PATCH] Fix bugprone-unused-return-value --- src/engine/server/databases/mysql.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/engine/server/databases/mysql.cpp b/src/engine/server/databases/mysql.cpp index 598a7da10..336d448f8 100644 --- a/src/engine/server/databases/mysql.cpp +++ b/src/engine/server/databases/mysql.cpp @@ -41,11 +41,6 @@ CMysqlConnection::CMysqlConnection( CMysqlConnection::~CMysqlConnection() { -#if defined(CONF_SQL) - m_pStmt.release(); - m_pPreparedStmt.release(); - m_pConnection.release(); -#endif } void CMysqlConnection::Print(IConsole *pConsole, const char *Mode) @@ -104,9 +99,9 @@ IDbConnection::Status CMysqlConnection::Connect() try { - m_pConnection.release(); - m_pPreparedStmt.release(); - m_pResults.release(); + m_pConnection.reset(); + m_pPreparedStmt.reset(); + m_pResults.reset(); sql::ConnectOptionsMap connection_properties; connection_properties["hostName"] = sql::SQLString(m_aIp);