summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-04 23:09:37 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-04 23:09:45 -0400
commit17ace643e4edbec1e5bd7b446d039f8c94beef75 (patch)
treedfd1d426f61cdb8bb5dd7d0dc0114c8960b761e8 /libs/ardour/session.cc
parent9b3b1d945f72324a5ee38b7053a54e9d257c41db (diff)
OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 718b68279d..0a402a3b2d 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -381,8 +381,9 @@ Session::Session (AudioEngine &eng,
*/
if (state_tree) {
- const XMLProperty* prop;
- if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {
+ XMLProperty const * prop;
+ XMLNode const * root (state_tree->root());
+ if ((prop = root->property (X_("sample-rate"))) != 0) {
sr = atoi (prop->value());
}
}
@@ -3221,13 +3222,13 @@ Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::s
for (XMLNodeList::iterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == X_("Processor")) {
/* ForceIDRegeneration does not catch the following */
- XMLProperty* role = (*i)->property (X_("role"));
- XMLProperty* type = (*i)->property (X_("type"));
+ XMLProperty const * role = (*i)->property (X_("role"));
+ XMLProperty const * type = (*i)->property (X_("type"));
if (role && role->value() == X_("Aux")) {
/* check if the target bus exists.
* we should not save aux-sends in templates.
*/
- XMLProperty* target = (*i)->property (X_("target"));
+ XMLProperty const * target = (*i)->property (X_("target"));
if (!target) {
(*i)->add_property ("type", "dangling-aux-send");
continue;