aboutsummaryrefslogtreecommitdiffstats
path: root/src/bodyPart.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2006-03-29 20:06:39 +0000
committerVincent Richard <[email protected]>2006-03-29 20:06:39 +0000
commite9501b48d86d3c450ac4cbd9b1726d0d22b21784 (patch)
tree13e2821f023bae07fb4d57beeddb2bae2d574ec7 /src/bodyPart.cpp
parentForce encoding when there is a CR/LF in the word. (diff)
downloadvmime-e9501b48d86d3c450ac4cbd9b1726d0d22b21784.tar.gz
vmime-e9501b48d86d3c450ac4cbd9b1726d0d22b21784.zip
Refactored and cleaned up smart pointers.
Diffstat (limited to 'src/bodyPart.cpp')
-rw-r--r--src/bodyPart.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp
index 6903adb2..6d686f9b 100644
--- a/src/bodyPart.cpp
+++ b/src/bodyPart.cpp
@@ -33,7 +33,7 @@ bodyPart::bodyPart()
m_body(vmime::create <body>()),
m_parent(NULL)
{
- m_body->setParentPart(this);
+ m_body->setParentPart(thisRef().dynamicCast <bodyPart>());
}
@@ -121,9 +121,15 @@ ref <body> bodyPart::getBody()
}
-weak_ref <bodyPart> bodyPart::getParentPart() const
+ref <bodyPart> bodyPart::getParentPart()
{
- return (m_parent);
+ return m_parent.acquire();
+}
+
+
+ref <const bodyPart> bodyPart::getParentPart() const
+{
+ return m_parent.acquire();
}