Replace deprecated std::auto_ptr with std::shared_ptr (#133)

This commit is contained in:
Meltie2013 2021-02-07 14:32:49 -06:00 committed by GitHub
parent 16d620b84d
commit 8c9ea174a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class MassMailMgr
} }
/// m_protoMail is owned by MassMail, so at copy original MassMail field set to NULL /// m_protoMail is owned by MassMail, so at copy original MassMail field set to NULL
std::auto_ptr<MailDraft> m_protoMail; std::shared_ptr<MailDraft> m_protoMail;
MailSender m_sender; MailSender m_sender;
ReceiversList m_receivers; ReceiversList m_receivers;

View File

@ -670,7 +670,7 @@ bool Database::ExecuteStmt(const SqlStatementID& id, SqlStmtParameters* params)
bool Database::DirectExecuteStmt(const SqlStatementID& id, SqlStmtParameters* params) bool Database::DirectExecuteStmt(const SqlStatementID& id, SqlStmtParameters* params)
{ {
MANGOS_ASSERT(params); MANGOS_ASSERT(params);
std::auto_ptr<SqlStmtParameters> p(params); std::shared_ptr<SqlStmtParameters> p(params);
// execute statement // execute statement
SqlConnection::Lock _guard(getAsyncConnection()); SqlConnection::Lock _guard(getAsyncConnection());
return _guard->ExecuteStmt(id.ID(), *params); return _guard->ExecuteStmt(id.ID(), *params);