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/net/pop3/POP3Response.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/net/pop3/POP3Response.cpp') diff --git a/src/net/pop3/POP3Response.cpp b/src/net/pop3/POP3Response.cpp index 975cd642..e24634c6 100644 --- a/src/net/pop3/POP3Response.cpp +++ b/src/net/pop3/POP3Response.cpp @@ -46,17 +46,17 @@ namespace net { namespace pop3 { -POP3Response::POP3Response(ref sok, ref toh) +POP3Response::POP3Response(shared_ptr sok, shared_ptr toh) : m_socket(sok), m_timeoutHandler(toh) { } // static -ref POP3Response::readResponse(ref conn) +shared_ptr POP3Response::readResponse(shared_ptr conn) { - ref resp = vmime::create - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr resp = shared_ptr + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string buffer; resp->readResponseImpl(buffer, /* multiLine */ false); @@ -70,10 +70,10 @@ ref POP3Response::readResponse(ref conn) // static -ref POP3Response::readMultilineResponse(ref conn) +shared_ptr POP3Response::readMultilineResponse(shared_ptr conn) { - ref resp = vmime::create - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr resp = shared_ptr + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string buffer; resp->readResponseImpl(buffer, /* multiLine */ true); @@ -96,12 +96,12 @@ ref POP3Response::readMultilineResponse(ref conn // static -ref POP3Response::readLargeResponse - (ref conn, utility::outputStream& os, +shared_ptr POP3Response::readLargeResponse + (shared_ptr conn, utility::outputStream& os, utility::progressListener* progress, const long predictedSize) { - ref resp = vmime::create - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr resp = shared_ptr + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string firstLine; resp->readResponseImpl(firstLine, os, progress, predictedSize); -- cgit v1.2.3