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/mailboxField.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mailboxField.cpp') diff --git a/src/mailboxField.cpp b/src/mailboxField.cpp index 4eb9d734..7d138f3e 100644 --- a/src/mailboxField.cpp +++ b/src/mailboxField.cpp @@ -47,12 +47,12 @@ void mailboxField::parse (const parsingContext& ctx, const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition) { - ref mbox = vmime::create (); + shared_ptr mbox = make_shared (); // Here, we cannot simply call "m_mailbox.parse()" because it // may have more than one address specified (even if this field // should contain only one). We are never too much careful... - ref
parsedAddress = address::parseNext(ctx, buffer, position, end, newPosition, NULL); + shared_ptr
parsedAddress = address::parseNext(ctx, buffer, position, end, newPosition, NULL); if (parsedAddress) { @@ -60,7 +60,7 @@ void mailboxField::parse { // If it is a group of mailboxes, take the first // mailbox of the group - ref group = parsedAddress.staticCast (); + shared_ptr group = dynamicCast (parsedAddress); if (!group->isEmpty()) mbox = group->getMailboxAt(0); @@ -68,7 +68,7 @@ void mailboxField::parse else { // Parse only if it is a mailbox - mbox = parsedAddress.staticCast (); + mbox = dynamicCast (parsedAddress); } } -- cgit v1.2.3