summaryrefslogtreecommitdiff
path: root/src/xml.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-11 00:16:40 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commitd95eacd3851a20e52202465ec22b4f72a4983dc8 (patch)
tree1dfc1092ae7d2e6b6b7c313ad808415f578d9712 /src/xml.h
parentcbee0d077e698541afcea82a95bafcea5245ab89 (diff)
Replace std::list with std::vector in the API.
Diffstat (limited to 'src/xml.h')
-rw-r--r--src/xml.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xml.h b/src/xml.h
index e698eea0..154ec210 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -67,10 +67,10 @@ optional_type_child (std::shared_ptr<const cxml::Node> node, std::string name)
}
template <class T>
-std::list<std::shared_ptr<T>>
+std::vector<std::shared_ptr<T>>
type_children (cxml::Node const & node, std::string name)
{
- std::list<std::shared_ptr<T> > r;
+ std::vector<std::shared_ptr<T>> r;
for (auto i: node.node_children(name)) {
r.push_back (std::make_shared<T>(i));
}
@@ -78,21 +78,21 @@ type_children (cxml::Node const & node, std::string name)
}
template <class T>
-std::list<std::shared_ptr<T>>
+std::vector<std::shared_ptr<T>>
type_children (std::shared_ptr<const cxml::Node> node, std::string name)
{
return type_children<T> (*node.get(), name);
}
template <class T>
-std::list<std::shared_ptr<T>>
+std::vector<std::shared_ptr<T>>
type_grand_children (cxml::Node const & node, std::string name, std::string sub)
{
return type_children<T> (node.node_child(name), sub);
}
template <class T>
-std::list<std::shared_ptr<T>>
+std::vector<std::shared_ptr<T>>
type_grand_children (std::shared_ptr<const cxml::Node> node, std::string name, std::string sub)
{
return type_grand_children<T> (*node.get(), name, sub);