From 3217dd9bf9476a544d450e9ac636ca629ad141d9 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 20 Dec 2004 12:33:55 +0000 Subject: Added component::getChildComponents() function. --- src/base.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/base.hpp') diff --git a/src/base.hpp b/src/base.hpp index 735b8893..9e06bba6 100644 --- a/src/base.hpp +++ b/src/base.hpp @@ -90,6 +90,19 @@ namespace vmime c.clear(); } + // Copy one vector to another, with type conversion + + template + void copy_vector(T1& v1, T2& v2) + { + const typename T1::size_type count = v1.size(); + + v2.resize(count); + + for (typename T1::size_type i = 0 ; i < count ; ++i) + v2[i] = v1[i]; + } + /* -- cgit