summaryrefslogtreecommitdiff
path: root/libs/pbd/xml++.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-05 23:14:48 +0000
committerDavid Robillard <d@drobilla.net>2008-10-05 23:14:48 +0000
commit6b0d22268b85f7033eb7ddcfe9e50e21b86eec34 (patch)
treef339432b60ee666d47a3bddd59c63b8c3b27a69b /libs/pbd/xml++.cc
parent14a40f32f696c0d2b4a51fe762c5038a52079706 (diff)
Normalize XML property name style, preserving old session loading (on load _ will be converted to -).
Still to go: Non-consistent PBD tag names, colours. git-svn-id: svn://localhost/ardour2/branches/3.0@3872 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/xml++.cc')
-rw-r--r--libs/pbd/xml++.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index 9643b5d3a8..a42923132b 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -475,6 +475,12 @@ XMLProperty::XMLProperty(const string &n, const string &v)
: _name(n),
_value(v)
{
+ // Normalize property name (replace '_' with '-' as old session are inconsistent)
+ for (size_t i = 0; i < _name.length(); ++i) {
+ if (_name[i] == '_') {
+ _name[i] = '-';
+ }
+ }
}
XMLProperty::~XMLProperty()