From f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 21 Nov 2013 22:16:57 +0100 Subject: Boost/C++11 shared pointers. --- src/security/sasl/defaultSASLAuthenticator.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/security/sasl/defaultSASLAuthenticator.cpp') diff --git a/src/security/sasl/defaultSASLAuthenticator.cpp b/src/security/sasl/defaultSASLAuthenticator.cpp index bb72e56f..7fe9b3eb 100644 --- a/src/security/sasl/defaultSASLAuthenticator.cpp +++ b/src/security/sasl/defaultSASLAuthenticator.cpp @@ -51,14 +51,14 @@ defaultSASLAuthenticator::~defaultSASLAuthenticator() } -const std::vector > +const std::vector > defaultSASLAuthenticator::getAcceptableMechanisms - (const std::vector >& available, - ref suggested) const + (const std::vector >& available, + shared_ptr suggested) const { if (suggested) { - std::vector > res; + std::vector > res; res.push_back(suggested); @@ -103,42 +103,42 @@ const string defaultSASLAuthenticator::getAnonymousToken() const const string defaultSASLAuthenticator::getServiceName() const { - return m_saslSession.acquire()->getServiceName(); + return m_saslSession.lock()->getServiceName(); } -void defaultSASLAuthenticator::setService(ref serv) +void defaultSASLAuthenticator::setService(shared_ptr serv) { m_service = serv; m_default.setService(serv); } -weak_ref defaultSASLAuthenticator::getService() const +weak_ptr defaultSASLAuthenticator::getService() const { return m_service; } -void defaultSASLAuthenticator::setSASLSession(ref sess) +void defaultSASLAuthenticator::setSASLSession(shared_ptr sess) { m_saslSession = sess; } -ref defaultSASLAuthenticator::getSASLSession() const +shared_ptr defaultSASLAuthenticator::getSASLSession() const { - return m_saslSession.acquire().constCast (); + return constCast (m_saslSession.lock()); } -void defaultSASLAuthenticator::setSASLMechanism(ref mech) +void defaultSASLAuthenticator::setSASLMechanism(shared_ptr mech) { m_saslMech = mech; } -ref defaultSASLAuthenticator::getSASLMechanism() const +shared_ptr defaultSASLAuthenticator::getSASLMechanism() const { return m_saslMech; } -- cgit v1.2.3