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:
Sampo Savolainen 2008-08-11 16:04:27 +00:00
parent daf91bc21d
commit a9e00793fe
2 changed files with 5 additions and 5 deletions

View file

@ -73,6 +73,7 @@ private:
XMLNodeList _children;
XMLPropertyList _proplist;
XMLPropertyMap _propmap;
mutable XMLNodeList _selected_children;
public:
XMLNode(const string &);

View file

@ -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 *