aboutsummaryrefslogtreecommitdiffstats
path: root/src/component.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-07-12 22:28:02 +0000
committerVincent Richard <[email protected]>2005-07-12 22:28:02 +0000
commit681297e10b666e13cc463f6fbb16236f36c3266c (patch)
tree5d2392e2283232ed3475cd9c69e22897b03e8a97 /src/component.cpp
parentAdded contentHandler::extractRaw(). (diff)
downloadvmime-681297e10b666e13cc463f6fbb16236f36c3266c.tar.gz
vmime-681297e10b666e13cc463f6fbb16236f36c3266c.zip
Reference counting and smart pointers.
Diffstat (limited to 'src/component.cpp')
-rw-r--r--src/component.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/component.cpp b/src/component.cpp
index c0301f7c..c237bd74 100644
--- a/src/component.cpp
+++ b/src/component.cpp
@@ -75,19 +75,19 @@ void component::setParsedBounds(const string::size_type start, const string::siz
}
-const std::vector <component*> component::getChildComponents()
+const std::vector <ref <component> > component::getChildComponents()
{
- const std::vector <const component*> constList =
+ const std::vector <ref <const component> > constList =
const_cast <const component*>(this)->getChildComponents();
- std::vector <component*> list;
+ std::vector <ref <component> > list;
- const std::vector <const component*>::size_type count = constList.size();
+ const std::vector <ref <const component> >::size_type count = constList.size();
list.resize(count);
- for (std::vector <const component*>::size_type i = 0 ; i < count ; ++i)
- list[i] = const_cast <component*>(constList[i]);
+ for (std::vector <ref <const component> >::size_type i = 0 ; i < count ; ++i)
+ list[i] = constList[i].constCast <component>();
return (list);
}