diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-08-29 23:40:33 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:36:54 +1000 |
commit | 8144b197c0cfed0028b6e51c1de5f6993d8ab1f5 (patch) | |
tree | 779acfa74eadbabf13444539abf75006c9bb06da /libs/surfaces/control_protocol | |
parent | a59288a1f2990ea01e1241b51cd994bc8400a038 (diff) |
Use XMLNode::get/set_property API in ARDOUR::ControlProtocol class
Diffstat (limited to 'libs/surfaces/control_protocol')
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc index ac244860b1..edcc06b23a 100644 --- a/libs/surfaces/control_protocol/control_protocol.cc +++ b/libs/surfaces/control_protocol/control_protocol.cc @@ -328,8 +328,8 @@ ControlProtocol::get_state () { XMLNode* node = new XMLNode (state_node_name); - node->add_property ("name", _name); - node->add_property ("feedback", get_feedback() ? "yes" : "no"); + node->set_property ("name", _name); + node->set_property ("feedback", get_feedback()); return *node; } @@ -337,10 +337,9 @@ ControlProtocol::get_state () int ControlProtocol::set_state (XMLNode const & node, int /* version */) { - const XMLProperty* prop; - - if ((prop = node.property ("feedback")) != 0) { - set_feedback (string_is_affirmative (prop->value())); + bool feedback; + if (node.get_property ("feedback", feedback)) { + set_feedback (feedback); } return 0; |