summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/keyboard.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/gtkmm2ext/keyboard.cc
parent9b3b1d945f72324a5ee38b7053a54e9d257c41db (diff)
OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)
Diffstat (limited to 'libs/gtkmm2ext/keyboard.cc')
-rw-r--r--libs/gtkmm2ext/keyboard.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/keyboard.cc b/libs/gtkmm2ext/keyboard.cc
index 7975fdebd7..983edbd0cf 100644
--- a/libs/gtkmm2ext/keyboard.cc
+++ b/libs/gtkmm2ext/keyboard.cc
@@ -215,7 +215,7 @@ Keyboard::get_state (void)
int
Keyboard::set_state (const XMLNode& node, int /*version*/)
{
- const XMLProperty* prop;
+ XMLProperty const * prop;
if ((prop = node.property ("copy-modifier")) != 0) {
sscanf (prop->value().c_str(), "%d", &CopyModifier);
@@ -702,8 +702,9 @@ Keyboard::read_keybindings (string const & path)
XMLNodeList const& children = tree.root()->children();
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
- if ((*i)->name() == X_("Bindings")) {
- XMLProperty const* name = (*i)->property (X_("name"));
+ XMLNode const * child = *i;
+ if (child->name() == X_("Bindings")) {
+ XMLProperty const* name = child->property (X_("name"));
if (!name) {
warning << _("Keyboard binding found without a name") << endmsg;
continue;