summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-09-10 21:27:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-09-10 21:27:39 +0000
commitc86210a9d5bdb7b36ad58552a1f99f53d48781b3 (patch)
tree6ab06935a1e2bc4ef6a4448dd01b09f5b2628c66 /libs/pbd
parent68e943265edf04e63a8e8b8f62bab20f99d9c637 (diff)
merge 2.0-ongoing into 3.0 @ 3581 - 3710
git-svn-id: svn://localhost/ardour2/branches/3.0@3712 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/xml++.h1
-rw-r--r--libs/pbd/xml++.cc9
2 files changed, 5 insertions, 5 deletions
diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h
index 290a449869..83cc8ff91b 100644
--- a/libs/pbd/pbd/xml++.h
+++ b/libs/pbd/pbd/xml++.h
@@ -78,6 +78,7 @@ private:
XMLNodeList _children;
XMLPropertyList _proplist;
XMLPropertyMap _propmap;
+ mutable XMLNodeList _selected_children;
public:
XMLNode(const string& name);
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index ec1ca5d2b9..9643b5d3a8 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -278,22 +278,21 @@ XMLNode::children(const string& n) const
{
/* returns all children matching name */
- static XMLNodeList retval;
XMLNodeConstIterator cur;
if (n.empty()) {
return _children;
}
-
- retval.erase(retval.begin(), retval.end());
+
+ _selected_children.clear();
for (cur = _children.begin(); cur != _children.end(); ++cur) {
if ((*cur)->name() == n) {
- retval.insert(retval.end(), *cur);
+ _selected_children.insert(_selected_children.end(), *cur);
}
}
- return retval;
+ return _selected_children;
}
XMLNode *