From b879d5b5c803a68aae61c767152aa96753fabce0 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 27 Aug 2016 23:29:52 +1000 Subject: Use XMLNode::get/set_property API in ARDOUR::ExportChannel class --- libs/ardour/export_channel.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libs/ardour/export_channel.cc') diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index cc388531df..77fa80a9f6 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -90,7 +90,7 @@ PortExportChannel::get_state (XMLNode * node) const for (PortSet::const_iterator it = ports.begin(); it != ports.end(); ++it) { boost::shared_ptr p = it->lock (); 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 PortExportChannel::set_state (XMLNode * node, Session & session) { - XMLProperty const * prop; XMLNodeList xml_ports = node->children ("Port"); for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) { - if ((prop = (*it)->property ("name"))) { - std::string const & name = prop->value(); + std::string name; + if ((*it)->get_property ("name", name)) { boost::shared_ptr port = boost::dynamic_pointer_cast (session.engine().get_port_by_name (name)); if (port) { ports.insert (port); -- cgit v1.2.3