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/stringContentHandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/stringContentHandler.cpp') diff --git a/src/stringContentHandler.cpp b/src/stringContentHandler.cpp index e4762dce..0fb032dd 100644 --- a/src/stringContentHandler.cpp +++ b/src/stringContentHandler.cpp @@ -68,9 +68,9 @@ stringContentHandler::~stringContentHandler() } -ref stringContentHandler::clone() const +shared_ptr stringContentHandler::clone() const { - return vmime::create (*this); + return make_shared (*this); } @@ -125,8 +125,8 @@ void stringContentHandler::generate(utility::outputStream& os, // buffer, and then re-encode to output stream... if (m_encoding != enc) { - ref theDecoder = m_encoding.getEncoder(); - ref theEncoder = enc.getEncoder(); + shared_ptr theDecoder = m_encoding.getEncoder(); + shared_ptr theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT); @@ -152,7 +152,7 @@ void stringContentHandler::generate(utility::outputStream& os, // Need to encode data before else { - ref theEncoder = enc.getEncoder(); + shared_ptr theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; theEncoder->getProperties()["text"] = (m_contentType.getType() == mediaTypes::TEXT); @@ -174,7 +174,7 @@ void stringContentHandler::extract(utility::outputStream& os, // Need to decode data else { - ref theDecoder = m_encoding.getEncoder(); + shared_ptr theDecoder = m_encoding.getEncoder(); utility::inputStreamStringProxyAdapter in(m_string); utility::progressListenerSizeAdapter plsa(progress, getLength()); -- cgit v1.2.3