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/component.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/component.cpp') 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::getChildComponents() +const std::vector > component::getChildComponents() { - const std::vector constList = + const std::vector > constList = const_cast (this)->getChildComponents(); - std::vector list; + std::vector > list; - const std::vector ::size_type count = constList.size(); + const std::vector >::size_type count = constList.size(); list.resize(count); - for (std::vector ::size_type i = 0 ; i < count ; ++i) - list[i] = const_cast (constList[i]); + for (std::vector >::size_type i = 0 ; i < count ; ++i) + list[i] = constList[i].constCast (); return (list); } -- cgit v1.2.3