client auth: Switch from CSmartPtr to std::shared_ptr

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2014-09-12 15:12:46 +02:00
parent 3953185b04
commit 7704bc49d7
13 changed files with 22 additions and 23 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ using std::vector;
}
CClient::~CClient() {
if (!m_spAuth.IsNull()) {
if (m_spAuth) {
CClientAuth* pAuth = (CClientAuth*) &(*m_spAuth);
pAuth->Invalidate();
}
@@ -618,7 +618,7 @@ void CClient::AuthUser() {
if (!m_bGotNick || !m_bGotUser || !m_bGotPass || m_bInCap || IsAttached())
return;
m_spAuth = new CClientAuth(this, m_sUser, m_sPass);
m_spAuth = std::make_shared<CClientAuth>(this, m_sUser, m_sPass);
CZNC::Get().AuthUser(m_spAuth);
}