sanitize_node now uses a vector of processor names instead of an array

This commit is contained in:
Nikolaus Gullotta 2019-04-04 10:24:56 -05:00 committed by Nikolaus Gullotta
parent 688fc8209f
commit 558c7aed93
No known key found for this signature in database
GPG key ID: 565F60578092AA31

View file

@ -439,12 +439,13 @@ void MixerSnapshot::load_from_session(string path)
XMLNode& MixerSnapshot::sanitize_node(XMLNode& node)
{
#ifndef MIXBUS
const string proc[] = {"PRE", "EQ", "Comp", "POST"};
const string name = "Processor";
const string prop = "name";
vector<string> procs {"PRE", "EQ", "Comp", "POST"};
const string node_name = "Processor";
const string prop_name = "name";
for(int i = 0; i <= 3; i++)
node.remove_node_and_delete(name, prop, proc[i]);
for(vector<string>::const_iterator it = procs.begin(); it != procs.end(); it++) {
node.remove_node_and_delete(node_name, prop_name, (*it));
}
#endif
return node;
}