From 681297e10b666e13cc463f6fbb16236f36c3266c Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 12 Jul 2005 22:28:02 +0000 Subject: Reference counting and smart pointers. --- src/messageId.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/messageId.cpp') diff --git a/src/messageId.cpp b/src/messageId.cpp index 9e878c2f..b8490792 100644 --- a/src/messageId.cpp +++ b/src/messageId.cpp @@ -129,7 +129,7 @@ void messageId::parse(const string& buffer, const string::size_type position, } -messageId* messageId::parseNext(const string& buffer, const string::size_type position, +ref messageId::parseNext(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition) { string::size_type pos = position; @@ -144,7 +144,7 @@ messageId* messageId::parseNext(const string& buffer, const string::size_type po while (pos < end && !parserHelpers::isSpace(buffer[pos])) ++pos; - messageId* mid = new messageId(); + ref mid = vmime::create (); mid->parse(buffer, begin, pos, NULL); if (newPosition != NULL) @@ -220,9 +220,9 @@ const bool messageId::operator!=(const messageId& mid) const } -messageId* messageId::clone() const +ref messageId::clone() const { - return new messageId(*this); + return vmime::create (*this); } @@ -266,9 +266,9 @@ void messageId::setRight(const string& right) } -const std::vector messageId::getChildComponents() const +const std::vector > messageId::getChildComponents() const { - return std::vector (); + return std::vector >(); } -- cgit v1.2.3