aboutsummaryrefslogtreecommitdiffstats
path: root/src/stringContentHandler.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
committerVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
commitf9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch)
tree2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/stringContentHandler.cpp
parentPer-protocol include files. (diff)
downloadvmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz
vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip
Boost/C++11 shared pointers.
Diffstat (limited to 'src/stringContentHandler.cpp')
-rw-r--r--src/stringContentHandler.cpp12
1 files changed, 6 insertions, 6 deletions
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 <contentHandler> stringContentHandler::clone() const
+shared_ptr <contentHandler> stringContentHandler::clone() const
{
- return vmime::create <stringContentHandler>(*this);
+ return make_shared <stringContentHandler>(*this);
}
@@ -125,8 +125,8 @@ void stringContentHandler::generate(utility::outputStream& os,
// buffer, and then re-encode to output stream...
if (m_encoding != enc)
{
- ref <utility::encoder::encoder> theDecoder = m_encoding.getEncoder();
- ref <utility::encoder::encoder> theEncoder = enc.getEncoder();
+ shared_ptr <utility::encoder::encoder> theDecoder = m_encoding.getEncoder();
+ shared_ptr <utility::encoder::encoder> 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 <utility::encoder::encoder> theEncoder = enc.getEncoder();
+ shared_ptr <utility::encoder::encoder> 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 <utility::encoder::encoder> theDecoder = m_encoding.getEncoder();
+ shared_ptr <utility::encoder::encoder> theDecoder = m_encoding.getEncoder();
utility::inputStreamStringProxyAdapter in(m_string);
utility::progressListenerSizeAdapter plsa(progress, getLength());