Use XMLNode::get/set_property API in ARDOUR::ExportChannel class
This commit is contained in:
parent
964297b953
commit
b879d5b5c8
|
@ -90,7 +90,7 @@ PortExportChannel::get_state (XMLNode * node) const
|
||||||
for (PortSet::const_iterator it = ports.begin(); it != ports.end(); ++it) {
|
for (PortSet::const_iterator it = ports.begin(); it != ports.end(); ++it) {
|
||||||
boost::shared_ptr<Port> p = it->lock ();
|
boost::shared_ptr<Port> p = it->lock ();
|
||||||
if (p && (port_node = node->add_child ("Port"))) {
|
if (p && (port_node = node->add_child ("Port"))) {
|
||||||
port_node->add_property ("name", p->name());
|
port_node->set_property ("name", p->name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,11 +98,10 @@ PortExportChannel::get_state (XMLNode * node) const
|
||||||
void
|
void
|
||||||
PortExportChannel::set_state (XMLNode * node, Session & session)
|
PortExportChannel::set_state (XMLNode * node, Session & session)
|
||||||
{
|
{
|
||||||
XMLProperty const * prop;
|
|
||||||
XMLNodeList xml_ports = node->children ("Port");
|
XMLNodeList xml_ports = node->children ("Port");
|
||||||
for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) {
|
for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) {
|
||||||
if ((prop = (*it)->property ("name"))) {
|
std::string name;
|
||||||
std::string const & name = prop->value();
|
if ((*it)->get_property ("name", name)) {
|
||||||
boost::shared_ptr<AudioPort> port = boost::dynamic_pointer_cast<AudioPort> (session.engine().get_port_by_name (name));
|
boost::shared_ptr<AudioPort> port = boost::dynamic_pointer_cast<AudioPort> (session.engine().get_port_by_name (name));
|
||||||
if (port) {
|
if (port) {
|
||||||
ports.insert (port);
|
ports.insert (port);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user