diff options
author | Vincent Richard <[email protected]> | 2006-03-29 20:06:39 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-03-29 20:06:39 +0000 |
commit | e9501b48d86d3c450ac4cbd9b1726d0d22b21784 (patch) | |
tree | 13e2821f023bae07fb4d57beeddb2bae2d574ec7 /src/bodyPart.cpp | |
parent | Force encoding when there is a CR/LF in the word. (diff) | |
download | vmime-e9501b48d86d3c450ac4cbd9b1726d0d22b21784.tar.gz vmime-e9501b48d86d3c450ac4cbd9b1726d0d22b21784.zip |
Refactored and cleaned up smart pointers.
Diffstat (limited to 'src/bodyPart.cpp')
-rw-r--r-- | src/bodyPart.cpp | 12 |
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(); } |