diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:23:56 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:23:56 +0000 |
commit | 58ce6c2bb736d4e096bbeca624fd292fc858c8b0 (patch) | |
tree | 3418f78e523929d4576f13d2eea208cb8ae20fc7 /libs | |
parent | ac38847d867ada9590324227385d867bb04be54a (diff) |
a better fix fpr that wierd XMLProperty botch
git-svn-id: svn://localhost/ardour2/branches/3.0@9128 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/export_preset.h | 2 | ||||
-rw-r--r-- | libs/ardour/export_preset.cc | 2 | ||||
-rw-r--r-- | libs/pbd/xml++.cc | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/ardour/export_preset.h b/libs/ardour/ardour/export_preset.h index 595cfaf9bf..b24cc70dcf 100644 --- a/libs/ardour/ardour/export_preset.h +++ b/libs/ardour/ardour/export_preset.h @@ -53,7 +53,7 @@ class ExportPreset { private: - void set_id (std::string id); + void set_id (std::string const & id); XMLNode * get_instant_xml () const; void save_instant_xml () const; diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc index e26f4175f4..eb405a5bd8 100644 --- a/libs/ardour/export_preset.cc +++ b/libs/ardour/export_preset.cc @@ -66,7 +66,7 @@ ExportPreset::set_name (string const & name) } void -ExportPreset::set_id (string id) +ExportPreset::set_id (string const & id) { _id = id; diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index dbed9d1917..dc27b8b1a5 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -377,8 +377,11 @@ XMLProperty* XMLNode::add_property(const char* n, const string& v) { string ns(n); - if (_propmap.find(ns) != _propmap.end()) { - remove_property(ns); + map<string,XMLProperty*>::iterator iter; + + if ((iter = _propmap.find(ns)) != _propmap.end()) { + iter->second->set_value (v); + return iter->second; } XMLProperty* tmp = new XMLProperty(ns, v); |