summaryrefslogtreecommitdiff
path: root/libs/pbd/controllable.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-10-18 13:18:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-10-18 13:18:47 +0000
commit4085309cdb07f011756a9ab90047037ef9ad8f20 (patch)
tree22fb3764a0b8120a06397b3605c59589be5f78d8 /libs/pbd/controllable.cc
parent9ec965a54eb9bafa6fa0cf4837809189affac49f (diff)
make Stateful::_id private and provide appropriate methods to set it, and use them throughout ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@10222 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/controllable.cc')
-rw-r--r--libs/pbd/controllable.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc
index 959abe443d..51877ee206 100644
--- a/libs/pbd/controllable.cc
+++ b/libs/pbd/controllable.cc
@@ -107,7 +107,7 @@ Controllable::get_state ()
char buf[64];
node->add_property (X_("name"), _name); // not reloaded from XML state, just there to look at
- _id.print (buf, sizeof (buf));
+ id().print (buf, sizeof (buf));
node->add_property (X_("id"), buf);
node->add_property (X_("flags"), enum_2_string (_flags));
snprintf (buf, sizeof (buf), "%2.12f", get_value());
@@ -129,9 +129,7 @@ Controllable::set_state (const XMLNode& node, int /*version*/)
Stateful::save_extra_xml (node);
- if ((prop = node.property (X_("id"))) != 0) {
- _id = prop->value();
- } else {
+ if (!set_id (node)) {
error << _("Controllable state node has no ID property") << endmsg;
return -1;
}