mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-05 21:25:46 +01:00
Make global static children variable an xml node object variable.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3683 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
daf91bc21d
commit
a9e00793fe
2 changed files with 5 additions and 5 deletions
|
|
@ -73,6 +73,7 @@ private:
|
|||
XMLNodeList _children;
|
||||
XMLPropertyList _proplist;
|
||||
XMLPropertyMap _propmap;
|
||||
mutable XMLNodeList _selected_children;
|
||||
|
||||
public:
|
||||
XMLNode(const string &);
|
||||
|
|
|
|||
|
|
@ -241,22 +241,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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue