diff options
author | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
commit | f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch) | |
tree | 2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/mailboxField.cpp | |
parent | Per-protocol include files. (diff) | |
download | vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip |
Boost/C++11 shared pointers.
Diffstat (limited to 'src/mailboxField.cpp')
-rw-r--r-- | src/mailboxField.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 <mailbox> mbox = vmime::create <mailbox>(); + shared_ptr <mailbox> mbox = make_shared <mailbox>(); // 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 <address> parsedAddress = address::parseNext(ctx, buffer, position, end, newPosition, NULL); + shared_ptr <address> 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 <mailboxGroup> group = parsedAddress.staticCast <mailboxGroup>(); + shared_ptr <mailboxGroup> group = dynamicCast <mailboxGroup>(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 <mailbox>(); + mbox = dynamicCast <mailbox>(parsedAddress); } } |