diff options
94 files changed, 295 insertions, 255 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index fd384ecf81..32d14144fb 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -741,7 +741,7 @@ ARDOUR_UI::configure_handler (GdkEventConfigure* /*conf*/) void ARDOUR_UI::set_transport_controllable_state (const XMLNode& node) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("roll")) != 0) { roll_controllable->set_id (prop->value()); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 55d352bd0b..1453732a11 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -331,7 +331,7 @@ ARDOUR_UI::setup_windows () const XMLNode* mnode = main_window_settings (); if (mnode) { - const XMLProperty* prop; + XMLProperty const * prop; gint x = -1; gint y = -1; gint w = -1; diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 834f7f31f7..a44c32a10a 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1301,7 +1301,7 @@ AudioClock::set_session (Session *s) _session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context()); _session->tempo_map().PropertyChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context()); - const XMLProperty* prop; + XMLProperty const * prop; XMLNode* node = _session->extra_xml (X_("ClockModes")); AudioClock::Mode amode; diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index cb2a3b44ea..ae0a691710 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -873,7 +873,7 @@ AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Aut const XMLNode* gui_node = ac->extra_xml ("GUI"); if (gui_node) { - const XMLProperty* prop = gui_node->property ("shown"); + XMLProperty const * prop = gui_node->property ("shown"); if (prop) { if (string_is_affirmative (prop->value())) { visible.insert (i->first); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b267eae670..77a0261be1 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2287,7 +2287,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force) int Editor::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; set_id (node); Tabbable::set_state (node, version); @@ -3873,7 +3873,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which) */ int pos; - XMLProperty* prop; + XMLProperty const * prop; char buf[32]; XMLNode* node = ARDOUR_UI::instance()->editor_settings(); diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 45f91a681f..bb45e97bb3 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -313,7 +313,7 @@ Editor::store_ruler_visibility () void Editor::restore_ruler_visibility () { - XMLProperty* prop; + XMLProperty const * prop; XMLNode * node = _session->extra_xml (X_("RulerVisibility")); no_ruler_shown_update = true; diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index d9f92d80e5..cc85bda878 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -1970,9 +1970,9 @@ EngineControl::set_state (const XMLNode& root) { XMLNodeList clist, cclist; XMLNodeConstIterator citer, cciter; - XMLNode* child; - XMLNode* grandchild; - XMLProperty* prop = NULL; + XMLNode const * child; + XMLNode const * grandchild; + XMLProperty const * prop = NULL; fprintf (stderr, "EngineControl::set_state\n"); diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc index f09306db0d..fc7c3d52be 100644 --- a/gtk2_ardour/export_video_dialog.cc +++ b/gtk2_ardour/export_video_dialog.cc @@ -402,7 +402,7 @@ ExportVideoDialog::apply_state (TimeSelection &tme, bool range) node = _session->extra_xml (X_("Videoexport")); if (node) { - const XMLProperty* prop; + XMLProperty const * prop; prop = node->property (X_("ChangeGeometry")); if (prop) { scale_checkbox.set_active(atoi(prop->value())?true:false); } prop = node->property (X_("KeepAspect")); diff --git a/gtk2_ardour/gui_object.cc b/gtk2_ardour/gui_object.cc index 5ea94f9c0c..c073a3aaf0 100644 --- a/gtk2_ardour/gui_object.cc +++ b/gtk2_ardour/gui_object.cc @@ -94,7 +94,7 @@ GUIObjectState::get_string (const string& id, const string& prop_name, bool* emp return string (); } - const XMLProperty* p (i->second->property (prop_name)); + XMLProperty const * p (i->second->property (prop_name)); if (!p) { if (empty) { *empty = true; @@ -130,7 +130,7 @@ GUIObjectState::set_state (const XMLNode& node) if ((*i)->name() != X_("Object")) { continue; } - const XMLProperty* prop = (*i)->property (X_("id")); + XMLProperty const * prop = (*i)->property (X_("id")); if (!prop) { continue; } diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index bdf40e680c..a84f647806 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -227,7 +227,7 @@ ArdourKeyboard::get_state (void) int ArdourKeyboard::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("constraint-modifier")) != 0) { sscanf (prop->value().c_str(), "%d", &constraint_mod); diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 1d54622c93..07ed9c41d8 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -1143,7 +1143,7 @@ LocationUI::clock_mode_from_session_instant_xml () const return AudioClock::Frames; } - XMLProperty* p = node->property (X_("clock-mode")); + XMLProperty const * p = node->property (X_("clock-mode")); if (!p) { return ARDOUR_UI::instance()->secondary_clock->mode(); } diff --git a/gtk2_ardour/meterbridge.cc b/gtk2_ardour/meterbridge.cc index aa2046a948..5906d7343a 100644 --- a/gtk2_ardour/meterbridge.cc +++ b/gtk2_ardour/meterbridge.cc @@ -463,7 +463,7 @@ Meterbridge::session_going_away () int Meterbridge::set_state (const XMLNode& node) { - const XMLProperty* prop; + XMLProperty const * prop; XMLNode* geometry; m_width = default_width; @@ -473,7 +473,7 @@ Meterbridge::set_state (const XMLNode& node) if ((geometry = find_named_node (node, "geometry")) != 0) { - XMLProperty* prop; + XMLProperty const * prop; if ((prop = geometry->property("x_size")) == 0) { prop = geometry->property ("x-size"); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index a848ede49e..c39ae33470 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -1652,7 +1652,7 @@ private: int Mixer_UI::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; Tabbable::set_state (node, version); @@ -1754,7 +1754,7 @@ void Mixer_UI::pane_allocation_handler (Allocation&, Gtk::Paned* which) { int pos; - XMLProperty* prop = 0; + XMLProperty const * prop = 0; XMLNode* node = ARDOUR_UI::instance()->mixer_settings(); XMLNode* geometry; int height; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index f3997203fd..51b8f3f885 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -657,7 +657,7 @@ ProcessorEntry::set_control_state (XMLNode const * node) if (_plugin_display) { XMLNode* n = GUIObjectState::get_node (node, X_("InlineDisplay")); - XMLProperty* p = n ? n->property (X_("visible")) : NULL; + XMLProperty const * p = n ? n->property (X_("visible")) : NULL; if (p) { if (string_is_affirmative (p->value ())) { _plugin_display->show(); @@ -947,7 +947,7 @@ ProcessorEntry::Control::set_state (XMLNode const * node) { XMLNode* n = GUIObjectState::get_node (node, state_id ()); if (n) { - XMLProperty* p = n->property (X_("visible")); + XMLProperty const * p = n->property (X_("visible")); set_visible (p && string_is_affirmative (p->value ())); } else { set_visible (false); @@ -4160,7 +4160,7 @@ ProcessorWindowProxy::set_state (const XMLNode& node, int /*version*/) XMLNodeList children = node.children (); XMLNodeList::const_iterator i = children.begin (); while (i != children.end()) { - XMLProperty* prop = (*i)->property (X_("name")); + XMLProperty const * prop = (*i)->property (X_("name")); if ((*i)->name() == X_("Window") && prop && prop->value() == _name) { break; } @@ -4168,7 +4168,7 @@ ProcessorWindowProxy::set_state (const XMLNode& node, int /*version*/) } if (i != children.end()) { - XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*i)->property (X_("custom-ui"))) != 0) { want_custom = PBD::string_is_affirmative (prop->value ()); } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 986a274ee6..e480485d84 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -2646,7 +2646,7 @@ RouteTimeAxisView::set_underlay_state() continue; } - XMLProperty* prop = child_node->property ("id"); + XMLProperty const * prop = child_node->property ("id"); if (prop) { PBD::ID id (prop->value()); @@ -2688,7 +2688,7 @@ RouteTimeAxisView::add_underlay (StreamView* v, bool /*update_xml*/) } XMLNode* node = underlay_xml_node->add_child("Underlay"); - XMLProperty* prop = node->add_property("id"); + XMLProperty const * prop = node->add_property("id"); prop->set_value(v->trackview().route()->id().to_s()); } #endif diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index d5fadb9cbb..2e5b8b84e0 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1365,7 +1365,7 @@ Selection::set_state (XMLNode const & node, int) for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) { if ((*i)->name() == X_("RouteView")) { - XMLProperty* prop_id = (*i)->property (X_("id")); + XMLProperty const * prop_id = (*i)->property (X_("id")); assert (prop_id); PBD::ID id (prop_id->value ()); RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id); @@ -1374,7 +1374,7 @@ Selection::set_state (XMLNode const & node, int) } } else if ((*i)->name() == X_("Region")) { - XMLProperty* prop_id = (*i)->property (X_("id")); + XMLProperty const * prop_id = (*i)->property (X_("id")); assert (prop_id); PBD::ID id (prop_id->value ()); @@ -1392,7 +1392,7 @@ Selection::set_state (XMLNode const & node, int) } } else if ((*i)->name() == X_("MIDINote")) { - XMLProperty* prop_region_id = (*i)->property (X_("region-id")); + XMLProperty const * prop_region_id = (*i)->property (X_("region-id")); assert (prop_region_id); @@ -1405,12 +1405,12 @@ Selection::set_state (XMLNode const & node, int) XMLNodeList children = (*i)->children (); for (XMLNodeList::const_iterator ci = children.begin(); ci != children.end(); ++ci) { - XMLProperty* prop_channel = (*ci)->property (X_("channel")); - XMLProperty* prop_time = (*ci)->property (X_("time")); - XMLProperty* prop_note = (*ci)->property (X_("note")); - XMLProperty* prop_length = (*ci)->property (X_("length")); - XMLProperty* prop_velocity = (*ci)->property (X_("velocity")); - XMLProperty* prop_off_velocity = (*ci)->property (X_("off-velocity")); + XMLProperty const * prop_channel = (*ci)->property (X_("channel")); + XMLProperty const * prop_time = (*ci)->property (X_("time")); + XMLProperty const * prop_note = (*ci)->property (X_("note")); + XMLProperty const * prop_length = (*ci)->property (X_("length")); + XMLProperty const * prop_velocity = (*ci)->property (X_("velocity")); + XMLProperty const * prop_off_velocity = (*ci)->property (X_("off-velocity")); assert (prop_channel); assert (prop_time); @@ -1445,16 +1445,16 @@ Selection::set_state (XMLNode const & node, int) } } else if ((*i)->name() == X_("ControlPoint")) { - XMLProperty* prop_type = (*i)->property (X_("type")); + XMLProperty const * prop_type = (*i)->property (X_("type")); assert(prop_type); if (prop_type->value () == "track") { - XMLProperty* prop_route_id = (*i)->property (X_("route-id")); - XMLProperty* prop_alist_id = (*i)->property (X_("automation-list-id")); - XMLProperty* prop_parameter = (*i)->property (X_("parameter")); - XMLProperty* prop_view_index = (*i)->property (X_("view-index")); + XMLProperty const * prop_route_id = (*i)->property (X_("route-id")); + XMLProperty const * prop_alist_id = (*i)->property (X_("automation-list-id")); + XMLProperty const * prop_parameter = (*i)->property (X_("parameter")); + XMLProperty const * prop_view_index = (*i)->property (X_("view-index")); assert (prop_route_id); assert (prop_alist_id); @@ -1484,8 +1484,8 @@ Selection::set_state (XMLNode const & node, int) add (cps); } } else if (prop_type->value () == "region") { - XMLProperty* prop_region_id = (*i)->property (X_("region-id")); - XMLProperty* prop_view_index = (*i)->property (X_("view-index")); + XMLProperty const * prop_region_id = (*i)->property (X_("region-id")); + XMLProperty const * prop_view_index = (*i)->property (X_("view-index")); if (!prop_region_id || !prop_view_index) { continue; @@ -1515,8 +1515,8 @@ Selection::set_state (XMLNode const & node, int) } } else if ((*i)->name() == X_("AudioRange")) { - XMLProperty* prop_start = (*i)->property (X_("start")); - XMLProperty* prop_end = (*i)->property (X_("end")); + XMLProperty const * prop_start = (*i)->property (X_("start")); + XMLProperty const * prop_end = (*i)->property (X_("end")); assert (prop_start); assert (prop_end); @@ -1528,8 +1528,8 @@ Selection::set_state (XMLNode const & node, int) } else if ((*i)->name() == X_("AutomationView")) { - XMLProperty* prop_id = (*i)->property (X_("id")); - XMLProperty* prop_parameter = (*i)->property (X_("parameter")); + XMLProperty const * prop_id = (*i)->property (X_("id")); + XMLProperty const * prop_parameter = (*i)->property (X_("parameter")); assert (prop_id); assert (prop_parameter); @@ -1552,8 +1552,8 @@ Selection::set_state (XMLNode const & node, int) } else if ((*i)->name() == X_("Marker")) { - XMLProperty* prop_id = (*i)->property (X_("id")); - XMLProperty* prop_start = (*i)->property (X_("start")); + XMLProperty const * prop_id = (*i)->property (X_("id")); + XMLProperty const * prop_start = (*i)->property (X_("start")); assert (prop_id); assert (prop_start); diff --git a/gtk2_ardour/selection_memento.cc b/gtk2_ardour/selection_memento.cc index ae3ad730ad..ffce0790f8 100644 --- a/gtk2_ardour/selection_memento.cc +++ b/gtk2_ardour/selection_memento.cc @@ -54,7 +54,7 @@ SelectionMemento::get_state () { int SelectionMemento::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; PublicEditor& editor = PublicEditor::instance(); if (node.name() != X_("SelectionMemento")) { return -1; diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index c001e5c5b1..931030180c 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -534,11 +534,12 @@ UIConfiguration::load_color_aliases (XMLNode const & node) color_aliases.clear (); for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() != X_("ColorAlias")) { + XMLNode const * child = *niter; + if (child->name() != X_("ColorAlias")) { continue; } - name = (*niter)->property (X_("name")); - alias = (*niter)->property (X_("alias")); + name = child->property (X_("name")); + alias = child->property (X_("alias")); if (name && alias) { color_aliases.insert (make_pair (name->value(), alias->value())); @@ -557,11 +558,12 @@ UIConfiguration::load_colors (XMLNode const & node) colors.clear (); for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() != X_("Color")) { + XMLNode const * child = *niter; + if (child->name() != X_("Color")) { continue; } - name = (*niter)->property (X_("name")); - color = (*niter)->property (X_("value")); + name = child->property (X_("name")); + color = child->property (X_("value")); if (name && color) { ArdourCanvas::Color c; @@ -583,12 +585,13 @@ UIConfiguration::load_modifiers (XMLNode const & node) modifiers.clear (); for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() != X_("Modifier")) { + XMLNode const * child = *niter; + if (child->name() != X_("Modifier")) { continue; } - name = (*niter)->property (X_("name")); - mod = (*niter)->property (X_("modifier")); + name = child->property (X_("name")); + mod = child->property (X_("modifier")); if (name && mod) { SVAModifier svam (mod->value()); diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 713ca1ca12..53336fa507 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -155,38 +155,38 @@ VideoTimeLine::set_session (ARDOUR::Session *s) set_id(*node); - const XMLProperty* proph = node->property (X_("Height")); + XMLProperty const * proph = node->property (X_("Height")); if (proph) { editor->set_video_timeline_height(atoi(proph->value())); } #if 0 /* TODO THINK: set FPS first time only ?! */ - const XMLProperty* propasfps = node->property (X_("AutoFPS")); + XMLProperty const * propasfps = node->property (X_("AutoFPS")); if (propasfps) { auto_set_session_fps = atoi(propasfps->value())?true:false; } #endif - const XMLProperty* propoffset = node->property (X_("VideoOffset")); + XMLProperty const * propoffset = node->property (X_("VideoOffset")); if (propoffset) { video_offset = atoll(propoffset->value()); video_offset_p = video_offset; } - const XMLProperty* proplock = node->property (X_("VideoOffsetLock")); + XMLProperty const * proplock = node->property (X_("VideoOffsetLock")); if (proplock) { video_offset_lock = atoi(proplock->value())?true:false; } - const XMLProperty* localfile = node->property (X_("LocalFile")); + XMLProperty const * localfile = node->property (X_("LocalFile")); if (localfile) { local_file = atoi(localfile->value())?true:false; } - const XMLProperty* propf = node->property (X_("Filename")); + XMLProperty const * propf = node->property (X_("Filename")); video_file_info(propf->value(), local_file); if ((node = _session->extra_xml (X_("Videomonitor")))) { - const XMLProperty* prop = node->property (X_("active")); + XMLProperty const * prop = node->property (X_("active")); if (prop && prop->value() == "yes" && found_xjadeo() && !video_filename.empty() && local_file) { open_video_monitor(); } @@ -225,7 +225,7 @@ int VideoTimeLine::set_state (const XMLNode& node, int /*version*/) { LocaleGuard lg (X_("C")); - const XMLProperty* propoffset = node.property (X_("VideoOffset")); + XMLProperty const * propoffset = node.property (X_("VideoOffset")); if (propoffset) { video_offset = atoll(propoffset->value()); } @@ -804,7 +804,7 @@ VideoTimeLine::open_video_monitor() { /* load mask from Session */ XMLNode* node = _session->extra_xml (X_("XJRestoreSettings")); if (node) { - const XMLProperty* prop = node->property (X_("mask")); + XMLProperty const * prop = node->property (X_("mask")); if (prop) { xj_settings_mask = atoi(prop->value()); } @@ -825,7 +825,7 @@ VideoTimeLine::open_video_monitor() { if (_session) { XMLNode* node = _session->extra_xml (X_("Videomonitor")); if (node) { - const XMLProperty* prop = node->property (X_("active")); + XMLProperty const * prop = node->property (X_("active")); if (prop && prop->value() != "yes") _session->set_dirty (); } else { _session->set_dirty (); diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index f755f15a89..7a50934630 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1932,7 +1932,7 @@ AudioDiskstream::get_state () int AudioDiskstream::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; XMLNodeList nlist = node.children(); XMLNodeIterator niter; uint32_t nchans = 1; @@ -2260,7 +2260,7 @@ AudioDiskstream::capture_buffer_load () const int AudioDiskstream::use_pending_capture_data (XMLNode& node) { - const XMLProperty* prop; + XMLProperty const * prop; XMLNodeList nlist = node.children(); XMLNodeIterator niter; boost::shared_ptr<AudioFileSource> fs; diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 0553206367..b70771fc15 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -38,7 +38,7 @@ AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden : Playlist (session, node, DataType::AUDIO, hidden) { #ifndef NDEBUG - const XMLProperty* prop = node.property("type"); + XMLProperty const * prop = node.property("type"); assert(!prop || DataType(prop->value()) == DataType::AUDIO); #endif @@ -487,7 +487,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version) for (XMLNodeConstIterator i = children.begin(); i != children.end(); ++i) { if ((*i)->name() == X_("Crossfade")) { - XMLProperty* p = (*i)->property (X_("active")); + XMLProperty const * p = (*i)->property (X_("active")); assert (p); if (!string_is_affirmative (p->value())) { diff --git a/libs/ardour/audio_playlist_importer.cc b/libs/ardour/audio_playlist_importer.cc index 5390f1c9d4..f24777c68d 100644 --- a/libs/ardour/audio_playlist_importer.cc +++ b/libs/ardour/audio_playlist_importer.cc @@ -51,7 +51,7 @@ AudioPlaylistImportHandler::AudioPlaylistImportHandler (XMLTree const & source, XMLNodeList const & pl_children = playlists->children(); for (XMLNodeList::const_iterator it = pl_children.begin(); it != pl_children.end(); ++it) { - const XMLProperty* type = (*it)->property("type"); + XMLProperty const * type = (*it)->property("type"); if ( !type || type->value() == "audio" ) { try { elements.push_back (ElementPtr ( new AudioPlaylistImporter (source, session, *this, **it))); @@ -75,7 +75,7 @@ AudioPlaylistImportHandler::get_regions (XMLNode const & node, ElementList & lis } void -AudioPlaylistImportHandler::update_region_id (XMLProperty* id_prop) +AudioPlaylistImportHandler::update_region_id (XMLProperty * id_prop) { PBD::ID old_id (id_prop->value()); PBD::ID new_id (region_handler.get_new_id (old_id)); @@ -178,7 +178,7 @@ AudioPlaylistImporter::_prepare_move () name = rename_pair.second; } - XMLProperty* p = xml_playlist.property ("name"); + XMLProperty * p = xml_playlist.property ("name"); if (!p) { error << _("badly-formed XML in imported playlist") << endmsg; return false; @@ -219,8 +219,8 @@ AudioPlaylistImporter::_move () // Update region ids in crossfades XMLNodeList crossfades = xml_playlist.children("Crossfade"); for (XMLNodeIterator it = crossfades.begin(); it != crossfades.end(); ++it) { - XMLProperty* in = (*it)->property("in"); - XMLProperty* out = (*it)->property("out"); + XMLProperty * in = (*it)->property("in"); + XMLProperty * out = (*it)->property("out"); if (!in || !out) { error << string_compose (X_("AudioPlaylistImporter (%1): did not find the \"in\" or \"out\" property from a crossfade"), name) << endmsg; continue; // or fatal? @@ -230,12 +230,12 @@ AudioPlaylistImporter::_move () handler.update_region_id (out); // rate convert length and position - XMLProperty* length = (*it)->property("length"); + XMLProperty * length = (*it)->property("length"); if (length) { length->set_value (rate_convert_samples (length->value())); } - XMLProperty* position = (*it)->property("position"); + XMLProperty * position = (*it)->property("position"); if (position) { position->set_value (rate_convert_samples (position->value())); } diff --git a/libs/ardour/audio_playlist_source.cc b/libs/ardour/audio_playlist_source.cc index 8effdd0c80..7ac487815c 100644 --- a/libs/ardour/audio_playlist_source.cc +++ b/libs/ardour/audio_playlist_source.cc @@ -108,7 +108,7 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc } } - const XMLProperty* prop; + XMLProperty const * prop; pair<framepos_t,framepos_t> extent = _playlist->get_extent(); AudioSource::_length = extent.second - extent.first; diff --git a/libs/ardour/audio_region_importer.cc b/libs/ardour/audio_region_importer.cc index 53367a35a4..615ec4c0d7 100644 --- a/libs/ardour/audio_region_importer.cc +++ b/libs/ardour/audio_region_importer.cc @@ -236,7 +236,7 @@ AudioRegionImporter::parse_source_xml () char buf[128]; std::string source_dir(get_sound_dir (source)); XMLNode * source_node; - XMLProperty *prop; + XMLProperty const * prop; // Get XML for sources if (!(source_node = source.root()->child (X_("Sources")))) { diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 47746ffe31..661469e01e 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -158,7 +158,7 @@ AudioTrack::deprecated_use_diskstream_connections () return 0; } - const XMLProperty* prop; + XMLProperty const * prop; XMLNode& node (*diskstream->deprecated_io_node); /* don't do this more than once. */ @@ -200,7 +200,7 @@ AudioTrack::deprecated_use_diskstream_connections () int AudioTrack::set_state (const XMLNode& node, int version) { - const XMLProperty *prop; + XMLProperty const * prop; if ((prop = node.property (X_("mode"))) != 0) { _mode = TrackMode (string_2_enum (prop->value(), _mode)); @@ -266,7 +266,7 @@ void AudioTrack::set_state_part_two () { XMLNode* fnode; - XMLProperty* prop; + XMLProperty const * prop; LocaleGuard lg (X_("C")); /* This is called after all session state has been restored but before diff --git a/libs/ardour/audio_track_importer.cc b/libs/ardour/audio_track_importer.cc index 43a40101cf..5280216d1b 100644 --- a/libs/ardour/audio_track_importer.cc +++ b/libs/ardour/audio_track_importer.cc @@ -51,7 +51,7 @@ AudioTrackImportHandler::AudioTrackImportHandler (XMLTree const & source, Sessio XMLNodeList const & route_list = routes->children(); for (XMLNodeList::const_iterator it = route_list.begin(); it != route_list.end(); ++it) { - const XMLProperty* type = (*it)->property("default-type"); + XMLProperty const * type = (*it)->property("default-type"); if ( (!type || type->value() == "audio") && ((*it)->property ("diskstream") != 0 || (*it)->property ("diskstream-id") != 0)) { try { elements.push_back (ElementPtr ( new AudioTrackImporter (source, session, *this, **it, pl_handler))); @@ -254,7 +254,7 @@ AudioTrackImporter::_prepare_move () return false; } - XMLProperty* p = c->property ("name"); + XMLProperty * p = c->property ("name"); if (!p) { error << _("badly-formed XML in imported track") << endmsg; return false; @@ -289,7 +289,7 @@ AudioTrackImporter::_move () } boost::shared_ptr<XMLNode> ds_node = ds_node_list->front(); - XMLProperty* p = ds_node->property (X_("id")); + XMLProperty * p = ds_node->property (X_("id")); assert (p); p->set_value (new_ds_id.to_s()); diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index c748b686ad..c2c377eb5e 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -3165,7 +3165,7 @@ AUPluginInfo::load_cached_info () } //initial version has incorrectly stored i/o info, and/or garbage chars. - const XMLProperty* version = root->property(X_("version")); + XMLProperty const * version = root->property(X_("version")); if (! ((version != NULL) && (version->value() == X_(AU_CACHE_VERSION)))) { error << "au_cache is not correct version. AU plugins will be re-scanned" << endmsg; return -1; @@ -3183,7 +3183,7 @@ AUPluginInfo::load_cached_info () const XMLNode* gchild; const XMLNodeList gchildren = child->children(); - const XMLProperty* prop = child->property (X_("id")); + XMLProperty const * prop = child->property (X_("id")); if (!prop) { continue; @@ -3221,8 +3221,8 @@ AUPluginInfo::load_cached_info () int in; int out; - const XMLProperty* iprop; - const XMLProperty* oprop; + XMLProperty const * iprop; + XMLProperty const * oprop; if (((iprop = gchild->property (X_("in"))) != 0) && ((oprop = gchild->property (X_("out"))) != 0)) { diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 22c1758ef1..987a226c76 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -840,7 +840,7 @@ int AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_changed, bool send) { const XMLNodeList& nlist = node.children(); - const XMLProperty *prop; + XMLProperty const * prop; LocaleGuard lg (X_("C")); boost::shared_ptr<Playlist> the_playlist (_playlist.lock()); @@ -871,7 +871,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_ for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) { XMLNode *child; - XMLProperty *prop; + XMLProperty const * prop; child = (*niter); diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 9d90d05cb1..7b3f424663 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -142,7 +142,7 @@ AudioSource::get_state () int AudioSource::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("captured-for")) != 0) { _captured_for = prop->value(); diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 3c5d610ce8..f85bc83e85 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -77,7 +77,7 @@ Automatable::~Automatable () int Automatable::old_set_automation_state (const XMLNode& node) { - const XMLProperty *prop; + XMLProperty const * prop; if ((prop = node.property ("path")) != 0) { load_automation (prop->value()); @@ -220,7 +220,7 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le if ((*niter)->name() == "AutomationList") { - const XMLProperty* id_prop = (*niter)->property("automation-id"); + XMLProperty const * id_prop = (*niter)->property("automation-id"); Evoral::Parameter param = (id_prop ? EventTypeMap::instance().from_symbol(id_prop->value()) diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index 761aa31867..21825612fa 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -425,7 +425,7 @@ AutomationList::set_state (const XMLNode& node, int version) XMLNodeList nlist = node.children(); XMLNode* nsos; XMLNodeIterator niter; - const XMLProperty* prop; + XMLProperty const * prop; if (node.name() == X_("events")) { /* partial state setting*/ @@ -443,7 +443,7 @@ AutomationList::set_state (const XMLNode& node, int version) const XMLNodeList& elist = node.children(); XMLNodeConstIterator i; - XMLProperty* prop; + XMLProperty const * prop; pframes_t x; double y; diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 7423d3b5c6..9f6216062a 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -168,7 +168,7 @@ ControlProtocolManager::instantiate (ControlProtocolInfo& cpi) cpi.descriptor = get_descriptor (cpi.path); - DEBUG_TRACE (DEBUG::ControlProtocols, string_compose ("instantiating %1\n", cpi.name)); + DEBUG_TRACE (DEBUG::ControlProtocols, string_compose ("instantiating %1\n", cpi.name)); if (cpi.descriptor == 0) { error << string_compose (_("control protocol name \"%1\" has no descriptor"), cpi.name) << endmsg; @@ -410,22 +410,24 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/) { XMLNodeList clist; XMLNodeConstIterator citer; - XMLProperty* prop; + XMLProperty const * prop; Glib::Threads::Mutex::Lock lm (protocols_lock); clist = node.children(); for (citer = clist.begin(); citer != clist.end(); ++citer) { - if ((*citer)->name() == X_("Protocol")) { + XMLNode const * child = *citer; - if ((prop = (*citer)->property (X_("active"))) == 0) { + if (child->name() == X_("Protocol")) { + + if ((prop = child->property (X_("active"))) == 0) { continue; } bool active = string_is_affirmative (prop->value()); - if ((prop = (*citer)->property (X_("name"))) == 0) { + if ((prop = child->property (X_("name"))) == 0) { continue; } diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index c538f6be8a..ed1c89a3e2 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -352,7 +352,7 @@ Delivery::state (bool full_state) int Delivery::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; if (IOProcessor::set_state (node, version)) { return -1; diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index 7f4214037d..1e5cc0c7c1 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -483,7 +483,7 @@ Diskstream::get_state () int Diskstream::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("name")) != 0) { _name = prop->value(); diff --git a/libs/ardour/element_importer.cc b/libs/ardour/element_importer.cc index 4f635f1693..d1a67da2c4 100644 --- a/libs/ardour/element_importer.cc +++ b/libs/ardour/element_importer.cc @@ -42,7 +42,7 @@ ElementImporter::ElementImporter (XMLTree const & source, ARDOUR::Session & sess _broken (false) { // Get samplerate - XMLProperty *prop; + XMLProperty const * prop; prop = source.root()->property ("sample-rate"); if (prop) { std::istringstream iss (prop->value()); diff --git a/libs/ardour/engine_state_controller.cc b/libs/ardour/engine_state_controller.cc index 57b8a84888..67cdc7d086 100644 --- a/libs/ardour/engine_state_controller.cc +++ b/libs/ardour/engine_state_controller.cc @@ -150,7 +150,7 @@ EngineStateController::_deserialize_and_load_engine_states () XMLNode* state_node = *state_node_iter; StatePtr engine_state (new State); - XMLProperty* prop = NULL; + XMLProperty const * prop = NULL; if ((prop = state_node->property ("backend-name")) == 0) { continue; @@ -302,7 +302,7 @@ EngineStateController::_deserialize_and_load_midi_port_states () for (; input_state_node_iter != input_state_nodes.end (); ++input_state_node_iter) { XMLNode* input_state_node = *input_state_node_iter; - XMLProperty* prop = NULL; + XMLProperty const * prop = NULL; if (input_state_node->name () != "input") { continue; @@ -341,7 +341,7 @@ EngineStateController::_deserialize_and_load_midi_port_states () for (; output_state_node_iter != output_state_nodes.end (); ++output_state_node_iter) { XMLNode* output_state_node = *output_state_node_iter; - XMLProperty* prop = NULL; + XMLProperty const * prop = NULL; if (output_state_node->name () != "output") { continue; diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index 2ccaf1ae33..26f5a7bb28 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -98,7 +98,7 @@ PortExportChannel::get_state (XMLNode * node) const void PortExportChannel::set_state (XMLNode * node, Session & session) { - XMLProperty * prop; + XMLProperty const * prop; XMLNodeList xml_ports = node->children ("Port"); for (XMLNodeList::iterator it = xml_ports.begin(); it != xml_ports.end(); ++it) { if ((prop = (*it)->property ("name"))) { diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index 201abb934b..efeb3398e5 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -107,7 +107,7 @@ int ExportFilename::set_state (const XMLNode & node) { XMLNode * child; - XMLProperty * prop; + XMLProperty const * prop; FieldPair pair; child = node.child ("Folder"); @@ -372,7 +372,7 @@ ExportFilename::get_field (XMLNode const & node, string const & name) XMLNodeList children = node.children(); for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) { - XMLProperty * prop = (*it)->property ("name"); + XMLProperty const * prop = (*it)->property ("name"); if (prop && !prop->value().compare (name)) { prop = (*it)->property ("enabled"); diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc index 6b0e2f237f..6183d0d2bf 100644 --- a/libs/ardour/export_format_specification.cc +++ b/libs/ardour/export_format_specification.cc @@ -700,7 +700,7 @@ ExportFormatSpecification::get_option (XMLNode const * node, std::string const & XMLNodeList list (node->children ("Option")); for (XMLNodeList::iterator it = list.begin(); it != list.end(); ++it) { - XMLProperty * prop = (*it)->property ("name"); + XMLProperty const * prop = (*it)->property ("name"); if (prop && !name.compare (prop->value())) { prop = (*it)->property ("value"); if (prop) { diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc index c6bae093c4..dec4c4b79a 100644 --- a/libs/ardour/export_preset.cc +++ b/libs/ardour/export_preset.cc @@ -30,7 +30,7 @@ ExportPreset::ExportPreset (string filename, Session & s) : { XMLNode * root; if ((root = global.root())) { - XMLProperty * prop; + XMLProperty const * prop; if ((prop = root->property ("id"))) { set_id (prop->value()); } @@ -124,7 +124,7 @@ ExportPreset::get_instant_xml () const if ((instant_xml = session.instant_xml ("ExportPresets"))) { XMLNodeList children = instant_xml->children ("ExportPreset"); for (XMLNodeList::iterator it = children.begin(); it != children.end(); ++it) { - XMLProperty * prop; + XMLProperty const * prop; if ((prop = (*it)->property ("id")) && _id == PBD::UUID(prop->value())) { return *it; } diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc index 932b99057a..717f1e305c 100644 --- a/libs/ardour/export_profile_manager.cc +++ b/libs/ardour/export_profile_manager.cc @@ -701,7 +701,7 @@ ExportProfileManager::init_formats (XMLNodeList nodes) ExportProfileManager::FormatStatePtr ExportProfileManager::deserialize_format (XMLNode & root) { - XMLProperty * prop; + XMLProperty const * prop; PBD::UUID id; if ((prop = root.property ("id"))) { diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index 3ec561d667..c148c6dd82 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -140,7 +140,7 @@ FileSource::init (const string& pathstr, bool must_exist) int FileSource::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("channel"))) != 0) { _channel = atoi (prop->value()); diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 8870535939..1c42993d4f 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -274,7 +274,7 @@ InternalSend::get_state() int InternalSend::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; init_gain (); diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 87bac6b8f4..642b2a0435 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -595,7 +595,7 @@ IO::set_state (const XMLNode& node, int version) */ assert (version >= 3000); - const XMLProperty* prop; + XMLProperty const * prop; XMLNodeConstIterator iter; LocaleGuard lg (X_("C")); @@ -656,7 +656,7 @@ IO::set_state (const XMLNode& node, int version) int IO::set_state_2X (const XMLNode& node, int version, bool in) { - const XMLProperty* prop; + XMLProperty const * prop; XMLNodeConstIterator iter; LocaleGuard lg (X_("C")); @@ -928,7 +928,7 @@ IO::make_connections (const XMLNode& node, int version, bool in) return make_connections_2X (node, version, in); } - const XMLProperty* prop; + XMLProperty const * prop; for (XMLNodeConstIterator i = node.children().begin(); i != node.children().end(); ++i) { @@ -989,7 +989,7 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name) the name of the thing we're applying it to. */ - XMLProperty* prop; + XMLProperty * prop; XMLNodeList children = node.children(); for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) { @@ -1020,7 +1020,7 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name) int IO::make_connections_2X (const XMLNode& node, int /*version*/, bool in) { - const XMLProperty* prop; + XMLProperty const * prop; /* XXX: bundles ("connections" as was) */ @@ -1596,7 +1596,7 @@ IO::bundle_channel_name (uint32_t c, uint32_t n, DataType t) const string IO::name_from_state (const XMLNode& node) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("name")) != 0) { return prop->value(); diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc index 6a6f09bbe2..955447a386 100644 --- a/libs/ardour/io_processor.cc +++ b/libs/ardour/io_processor.cc @@ -147,7 +147,7 @@ IOProcessor::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } - const XMLProperty *prop; + XMLProperty const * prop; const XMLNode *io_node = 0; Processor::set_state(node, version); @@ -170,7 +170,7 @@ IOProcessor::set_state (const XMLNode& node, int version) if (_own_input && _input) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*niter)->property ("name")) != 0) { if (_name == prop->value()) { if ((prop = (*niter)->property ("direction")) != 0) { @@ -200,7 +200,7 @@ IOProcessor::set_state (const XMLNode& node, int version) if (_own_output && _output) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { if ((*niter)->name() == "IO") { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*niter)->property ("name")) != 0) { if (_name == prop->value()) { if ((prop = (*niter)->property ("direction")) != 0) { diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index d0d3ad57ba..a80c2797c6 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -374,7 +374,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) #ifndef NO_PLUGIN_STATE XMLNodeList nodes; - XMLProperty *prop; + XMLProperty const * prop; XMLNodeConstIterator iter; XMLNode *child; const char *port; @@ -424,7 +424,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) { #ifndef NO_PLUGIN_STATE XMLNodeList nodes; - XMLProperty *prop; + XMLProperty const * prop; XMLNodeConstIterator iter; XMLNode *child; const char *port; diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 1b63ce4431..0820660db6 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -598,7 +598,7 @@ Location::get_state () int Location::set_state (const XMLNode& node, int version) { - const XMLProperty *prop; + XMLProperty const * prop; XMLNodeList cd_list = node.children(); XMLNodeConstIterator cd_iter; diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc index af9e8503da..1ab93e4d15 100644 --- a/libs/ardour/luaproc.cc +++ b/libs/ardour/luaproc.cc @@ -776,7 +776,7 @@ LuaProc::set_state (const XMLNode& node, int version) { #ifndef NO_PLUGIN_STATE XMLNodeList nodes; - XMLProperty *prop; + XMLProperty const * prop; XMLNodeConstIterator iter; XMLNode *child; const char *value; @@ -1067,7 +1067,7 @@ LuaProc::load_preset (PresetRecord r) XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * label = (*i)->property (X_("label")); assert (label); if (label->value() != r.label) { continue; @@ -1075,8 +1075,8 @@ LuaProc::load_preset (PresetRecord r) for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) { if ((*j)->name() == X_("Parameter")) { - XMLProperty* index = (*j)->property (X_("index")); - XMLProperty* value = (*j)->property (X_("value")); + XMLProperty const * index = (*j)->property (X_("index")); + XMLProperty const * value = (*j)->property (X_("value")); assert (index); assert (value); set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ())); @@ -1139,8 +1139,8 @@ LuaProc::find_presets () XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* uri = (*i)->property (X_("uri")); - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * uri = (*i)->property (X_("uri")); + XMLProperty const * label = (*i)->property (X_("label")); assert (uri); assert (label); @@ -1207,8 +1207,8 @@ LuaPluginInfo::get_presets (bool /*user_only*/) const if (t->read ()) { XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* uri = (*i)->property (X_("uri")); - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * uri = (*i)->property (X_("uri")); + XMLProperty const * label = (*i)->property (X_("label")); p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true)); } } diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index dd5292eb5a..908b6b49f9 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1800,7 +1800,7 @@ int LV2Plugin::set_state(const XMLNode& node, int version) { XMLNodeList nodes; - const XMLProperty* prop; + XMLProperty const * prop; XMLNodeConstIterator iter; XMLNode* child; const char* sym; diff --git a/libs/ardour/lxvst_plugin.cc b/libs/ardour/lxvst_plugin.cc index 2c50144f26..4b32e47bb5 100644 --- a/libs/ardour/lxvst_plugin.cc +++ b/libs/ardour/lxvst_plugin.cc @@ -150,8 +150,8 @@ LXVSTPluginInfo::get_presets (bool user_only) const if (t->read ()) { // TODO read names only. skip parsing the actual data XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* uri = (*i)->property (X_("uri")); - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * uri = (*i)->property (X_("uri")); + XMLProperty const * label = (*i)->property (X_("label")); p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true)); } } diff --git a/libs/ardour/midi_automation_list_binder.cc b/libs/ardour/midi_automation_list_binder.cc index f7249d72b1..b01155b739 100644 --- a/libs/ardour/midi_automation_list_binder.cc +++ b/libs/ardour/midi_automation_list_binder.cc @@ -35,10 +35,10 @@ MidiAutomationListBinder::MidiAutomationListBinder (boost::shared_ptr<MidiSource MidiAutomationListBinder::MidiAutomationListBinder (XMLNode* node, Session::SourceMap const & sources) : _parameter (0, 0, 0) { - XMLProperty* source = node->property ("source-id"); + XMLProperty const * source = node->property ("source-id"); assert (source); - XMLProperty* parameter = node->property ("parameter"); + XMLProperty const * parameter = node->property ("parameter"); assert (parameter); Session::SourceMap::const_iterator i = sources.find (PBD::ID (source->value())); diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 1950fbeb19..b5e93ae494 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -491,7 +491,7 @@ Evoral::Sequence<MidiModel::TimeType>::NotePtr MidiModel::NoteDiffCommand::unmarshal_note (XMLNode *xml_note) { unsigned int note; - XMLProperty* prop; + XMLProperty const * prop; unsigned int channel; MidiModel::TimeType time; MidiModel::TimeType length; @@ -599,7 +599,7 @@ MidiModel::NoteDiffCommand::marshal_change (const NoteChange& change) MidiModel::NoteDiffCommand::NoteChange MidiModel::NoteDiffCommand::unmarshal_change (XMLNode *xml_change) { - XMLProperty* prop; + XMLProperty const * prop; NoteChange change; change.note_id = 0; @@ -876,7 +876,7 @@ MidiModel::SysExDiffCommand::marshal_change (const Change& change) MidiModel::SysExDiffCommand::Change MidiModel::SysExDiffCommand::unmarshal_change (XMLNode *xml_change) { - XMLProperty* prop; + XMLProperty const * prop; Change change; if ((prop = xml_change->property ("property")) != 0) { @@ -1235,8 +1235,8 @@ MidiModel::PatchChangeDiffCommand::marshal_change (const Change& c) MidiModel::PatchChangePtr MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n) { - XMLProperty* prop; - XMLProperty* prop_id; + XMLProperty const * prop; + XMLProperty const * prop_id; Evoral::event_id_t id = 0; Evoral::Beats time = Evoral::Beats(); int channel = 0; @@ -1277,7 +1277,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n) MidiModel::PatchChangeDiffCommand::Change MidiModel::PatchChangeDiffCommand::unmarshal_change (XMLNode* n) { - XMLProperty* prop; + XMLProperty const * prop; Change c; int an_int; diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index 7adbe70ff3..5402664ed1 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -48,7 +48,7 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) , _read_end(0) { #ifndef NDEBUG - const XMLProperty* prop = node.property("type"); + XMLProperty const * prop = node.property("type"); assert(prop && DataType(prop->value()) == DataType::MIDI); #endif diff --git a/libs/ardour/midi_scene_change.cc b/libs/ardour/midi_scene_change.cc index ed0729b071..9304a64323 100644 --- a/libs/ardour/midi_scene_change.cc +++ b/libs/ardour/midi_scene_change.cc @@ -123,7 +123,7 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */) return -1; } - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("program"))) == 0) { return -1; diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index 0314a92c23..b8afba6b3f 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -113,7 +113,7 @@ MidiSource::get_state () int MidiSource::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("captured-for")) != 0) { _captured_for = prop->value(); } diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index da47fabc78..3aba6bf39e 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -161,7 +161,7 @@ MidiTrack::midi_diskstream() const int MidiTrack::set_state (const XMLNode& node, int version) { - const XMLProperty *prop; + XMLProperty const * prop; /* This must happen before Track::set_state(), as there will be a buffer fill during that call, and we must fill buffers using the correct @@ -272,7 +272,7 @@ void MidiTrack::set_state_part_two () { XMLNode* fnode; - XMLProperty* prop; + XMLProperty const * prop; LocaleGuard lg (X_("C")); /* This is called after all session state has been restored but before diff --git a/libs/ardour/midiport_manager.cc b/libs/ardour/midiport_manager.cc index 7f3f05a7db..5b97b4090a 100644 --- a/libs/ardour/midiport_manager.cc +++ b/libs/ardour/midiport_manager.cc @@ -111,7 +111,7 @@ MidiPortManager::create_ports () void MidiPortManager::set_midi_port_states (const XMLNodeList&nodes) { - XMLProperty* prop; + XMLProperty const * prop; typedef map<std::string,boost::shared_ptr<Port> > PortMap; PortMap ports; const int version = 0; diff --git a/libs/ardour/monitor_processor.cc b/libs/ardour/monitor_processor.cc index 6b73af6e31..e8585c8da2 100644 --- a/libs/ardour/monitor_processor.cc +++ b/libs/ardour/monitor_processor.cc @@ -112,7 +112,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version) return ret; } - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("type"))) == 0) { error << string_compose (X_("programming error: %1"), X_("MonitorProcessor XML settings have no type information")) diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc index 8f81a5e672..4b83d57a9b 100644 --- a/libs/ardour/mute_master.cc +++ b/libs/ardour/mute_master.cc @@ -136,7 +136,7 @@ MuteMaster::set_mute_points (MutePoint mp) int MuteMaster::set_state (const XMLNode& node, int /*version*/) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("mute-point")) != 0) { _mute_point = (MutePoint) string_2_enum (prop->value(), _mute_point); diff --git a/libs/ardour/pannable.cc b/libs/ardour/pannable.cc index f589024435..11fec12eca 100644 --- a/libs/ardour/pannable.cc +++ b/libs/ardour/pannable.cc @@ -213,7 +213,7 @@ Pannable::set_state (const XMLNode& root, int version) for (niter = nlist.begin(); niter != nlist.end(); ++niter) { if ((*niter)->name() == Controllable::xml_node_name) { - const XMLProperty* prop = (*niter)->property (X_("name")); + XMLProperty const * prop = (*niter)->property (X_("name")); if (!prop) { continue; @@ -235,7 +235,7 @@ Pannable::set_state (const XMLNode& root, int version) set_automation_xml_state (**niter, PanAzimuthAutomation); } else { - const XMLProperty* prop; + XMLProperty const * prop; /* old school (alpha1-6) XML info */ diff --git a/libs/ardour/panner_shell.cc b/libs/ardour/panner_shell.cc index 1af0da0279..606fc0ca00 100644 --- a/libs/ardour/panner_shell.cc +++ b/libs/ardour/panner_shell.cc @@ -171,7 +171,7 @@ PannerShell::set_state (const XMLNode& node, int version) { XMLNodeList nlist = node.children (); XMLNodeConstIterator niter; - const XMLProperty *prop; + XMLProperty const * prop; LocaleGuard lg (X_("C")); if ((prop = node.property (X_("bypassed"))) != 0) { diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index e2d66c109a..3301fe9f9e 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -141,7 +141,7 @@ Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide , _type(type) { #ifndef NDEBUG - const XMLProperty* prop = node.property("type"); + XMLProperty const * prop = node.property("type"); assert(!prop || DataType(prop->value()) == _type); #endif @@ -2156,7 +2156,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir) XMLNodeConstIterator niter; XMLPropertyList plist; XMLPropertyConstIterator piter; - XMLProperty *prop; + XMLProperty const * prop; boost::shared_ptr<Region> region; string region_name; bool seen_region_nodes = false; diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc index 150ae6c3ac..79bbfb02f3 100644 --- a/libs/ardour/playlist_factory.cc +++ b/libs/ardour/playlist_factory.cc @@ -36,7 +36,7 @@ PBD::Signal2<void,boost::shared_ptr<Playlist>, bool> PlaylistFactory::PlaylistCr boost::shared_ptr<Playlist> PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unused) { - const XMLProperty* type = node.property("type"); + XMLProperty const * type = node.property("type"); boost::shared_ptr<Playlist> pl; diff --git a/libs/ardour/playlist_source.cc b/libs/ardour/playlist_source.cc index ed8735b865..8dc2bce418 100644 --- a/libs/ardour/playlist_source.cc +++ b/libs/ardour/playlist_source.cc @@ -93,7 +93,7 @@ PlaylistSource::set_state (const XMLNode& node, int /*version*/) { /* check that we have a playlist ID */ - const XMLProperty *prop = node.property (X_("playlist")); + XMLProperty const * prop = node.property (X_("playlist")); if (!prop) { error << _("No playlist ID in PlaylistSource XML!") << endmsg; diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 7ae6eb6a0c..5a0ae808e1 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -2006,7 +2006,7 @@ PluginInsert::set_control_ids (const XMLNode& node, int version) for (iter = nlist.begin(); iter != nlist.end(); ++iter) { if ((*iter)->name() == Controllable::xml_node_name) { - const XMLProperty* prop; + XMLProperty const * prop; uint32_t p = (uint32_t)-1; #ifdef LV2_SUPPORT @@ -2047,7 +2047,7 @@ PluginInsert::set_state(const XMLNode& node, int version) XMLNodeList nlist = node.children(); XMLNodeIterator niter; XMLPropertyList plist; - const XMLProperty *prop; + XMLProperty const * prop; ARDOUR::PluginType type; if ((prop = node.property ("type")) == 0) { @@ -2329,7 +2329,7 @@ PluginInsert::set_parameter_state_2X (const XMLNode& node, int version) } XMLNodeList cnodes; - XMLProperty *cprop; + XMLProperty const * cprop; XMLNodeConstIterator iter; XMLNode *child; const char *port; diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 7888167a70..61313f371c 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -587,7 +587,7 @@ Port::get_state () const int Port::set_state (const XMLNode& node, int) { - const XMLProperty* prop; + XMLProperty const * prop; if (node.name() != state_node_name) { return -1; diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc index ce34048dde..8ec5ead530 100644 --- a/libs/ardour/port_insert.cc +++ b/libs/ardour/port_insert.cc @@ -186,7 +186,7 @@ PortInsert::set_state (const XMLNode& node, int version) XMLNodeList nlist = node.children(); XMLNodeIterator niter; XMLPropertyList plist; - const XMLProperty *prop; + XMLProperty const * prop; const XMLNode* insert_node = &node; diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc index d3ffe152cb..f13edb5165 100644 --- a/libs/ardour/processor.cc +++ b/libs/ardour/processor.cc @@ -180,8 +180,8 @@ Processor::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } - const XMLProperty *prop; - const XMLProperty *legacy_active = 0; + XMLProperty const * prop; + XMLProperty const * legacy_active = 0; bool leave_name_alone = (node.property ("ignore-name") != 0); if (!leave_name_alone) { @@ -205,7 +205,7 @@ Processor::set_state (const XMLNode& node, int version) if ((*niter)->name() == X_("Automation")) { - XMLProperty *prop; + XMLProperty const * prop; if ((prop = (*niter)->property ("path")) != 0) { old_set_automation_state (*(*niter)); diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 753e578f64..bcc63af9d6 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -1260,7 +1260,7 @@ Region::set_state (const XMLNode& node, int version) int Region::_set_state (const XMLNode& node, int /*version*/, PropertyChange& what_changed, bool send) { - const XMLProperty* prop; + XMLProperty const * prop; Stateful::save_extra_xml (node); diff --git a/libs/ardour/return.cc b/libs/ardour/return.cc index db81568479..9c0f19ab03 100644 --- a/libs/ardour/return.cc +++ b/libs/ardour/return.cc @@ -86,7 +86,7 @@ Return::set_state (const XMLNode& node, int version) { XMLNodeList nlist = node.children(); XMLNodeIterator niter; - const XMLProperty* prop; + XMLProperty const * prop; const XMLNode* insert_node = &node; /* Return has regular IO automation (gain, pan) */ diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 7cfcffdb37..5466cb5a84 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -1362,7 +1362,7 @@ Route::processor_selfdestruct (boost::weak_ptr<Processor> wp) bool Route::add_processor_from_xml_2X (const XMLNode& node, int version) { - const XMLProperty *prop; + XMLProperty const * prop; try { boost::shared_ptr<Processor> processor; @@ -2821,7 +2821,7 @@ Route::set_state (const XMLNode& node, int version) XMLNodeList nlist; XMLNodeConstIterator niter; XMLNode *child; - const XMLProperty *prop; + XMLProperty const * prop; if (node.name() != "Route"){ error << string_compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg; @@ -3044,7 +3044,7 @@ Route::set_state_2X (const XMLNode& node, int version) XMLNodeList nlist; XMLNodeConstIterator niter; XMLNode *child; - const XMLProperty *prop; + XMLProperty const * prop; /* 2X things which still remain to be handled: * default-type @@ -3330,7 +3330,7 @@ Route::set_processor_state (const XMLNode& node) for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - XMLProperty* prop = (*niter)->property ("type"); + XMLProperty const * prop = (*niter)->property ("type"); if (prop->value() == "amp") { _amp->set_state (**niter, Stateful::current_state_version); @@ -3367,7 +3367,7 @@ Route::set_processor_state (const XMLNode& node) ProcessorList::iterator o; for (o = _processors.begin(); o != _processors.end(); ++o) { - XMLProperty* id_prop = (*niter)->property(X_("id")); + XMLProperty const * id_prop = (*niter)->property(X_("id")); if (id_prop && (*o)->id() == id_prop->value()) { (*o)->set_state (**niter, Stateful::current_state_version); new_order.push_back (*o); @@ -4585,7 +4585,7 @@ Route::set_name_in_state (XMLNode& node, string const & name, bool rename_playli } else if ((*i)->name() == X_("Processor")) { - XMLProperty* role = (*i)->property (X_("role")); + XMLProperty const * role = (*i)->property (X_("role")); if (role && role->value() == X_("Main")) { (*i)->add_property (X_("name"), name); } diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index 9ad5aa91e6..b482bb85d3 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -249,7 +249,7 @@ RouteGroup::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } - const XMLProperty *prop; + XMLProperty const * prop; set_id (node); set_values (node); diff --git a/libs/ardour/scene_change.cc b/libs/ardour/scene_change.cc index aed899565f..dcf83951cd 100644 --- a/libs/ardour/scene_change.cc +++ b/libs/ardour/scene_change.cc @@ -30,7 +30,7 @@ const uint32_t SceneChange::out_of_bound_color = 0x00000000; /* note: zero alpha boost::shared_ptr<SceneChange> SceneChange::factory (const XMLNode& node, int version) { - const XMLProperty* prop = node.property (X_("type")); + XMLProperty const * prop = node.property (X_("type")); if (prop->value() == X_("MIDI")) { return boost::shared_ptr<SceneChange> (new MIDISceneChange (node, version)); diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index ebe8c46c8f..6ebaaf28b3 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -239,7 +239,7 @@ Send::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } - const XMLProperty* prop; + XMLProperty const * prop; Delivery::set_state (node, version); 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; diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index d495d0b701..4afac073fd 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -949,7 +949,7 @@ Session::load_state (string snapshot_name) return -1; } - XMLNode& root (*state_tree->root()); + XMLNode const & root (*state_tree->root()); if (root.name() != X_("Session")) { error << string_compose (_("Session file %1 is not a session"), xmlpath) << endmsg; @@ -958,7 +958,7 @@ Session::load_state (string snapshot_name) return -1; } - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = root.property ("version")) == 0) { /* no version implies very old version of Ardour */ @@ -1298,7 +1298,7 @@ Session::set_state (const XMLNode& node, int version) { XMLNodeList nlist; XMLNode* child; - const XMLProperty* prop; + XMLProperty const * prop; int ret = -1; _state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave); @@ -1581,7 +1581,7 @@ Session::XMLRouteFactory (const XMLNode& node, int version) XMLNode* ds_child = find_named_node (node, X_("Diskstream")); DataType type = DataType::AUDIO; - const XMLProperty* prop = node.property("default-type"); + XMLProperty const * prop = node.property("default-type"); if (prop) { type = DataType (prop->value()); @@ -1614,7 +1614,7 @@ Session::XMLRouteFactory (const XMLNode& node, int version) } else { enum Route::Flag flags = Route::Flag(0); - const XMLProperty* prop = node.property("flags"); + XMLProperty const * prop = node.property("flags"); if (prop) { flags = Route::Flag (string_2_enum (prop->value(), flags)); } @@ -1647,7 +1647,7 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version) } DataType type = DataType::AUDIO; - const XMLProperty* prop = node.property("default-type"); + XMLProperty const * prop = node.property("default-type"); if (prop) { type = DataType (prop->value()); @@ -1692,7 +1692,7 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version) } else { enum Route::Flag flags = Route::Flag(0); - const XMLProperty* prop = node.property("flags"); + XMLProperty const * prop = node.property("flags"); if (prop) { flags = Route::Flag (string_2_enum (prop->value(), flags)); } @@ -1724,7 +1724,7 @@ Session::load_regions (const XMLNode& node) for (niter = nlist.begin(); niter != nlist.end(); ++niter) { if ((region = XMLRegionFactory (**niter, false)) == 0) { error << _("Session: cannot create Region from XML description."); - const XMLProperty *name = (**niter).property("name"); + XMLProperty const * name = (**niter).property("name"); if (name) { error << " " << string_compose (_("Can not load state for region '%1'"), name->value()); @@ -1742,7 +1742,7 @@ Session::load_compounds (const XMLNode& node) { XMLNodeList calist = node.children(); XMLNodeConstIterator caiter; - XMLProperty *caprop; + XMLProperty const * caprop; for (caiter = calist.begin(); caiter != calist.end(); ++caiter) { XMLNode* ca = *caiter; @@ -1789,7 +1789,7 @@ Session::load_nested_sources (const XMLNode& node) /* it may already exist, so don't recreate it unnecessarily */ - XMLProperty* prop = (*niter)->property (X_("id")); + XMLProperty const * prop = (*niter)->property (X_("id")); if (!prop) { error << _("Nested source has no ID info in session file! (ignored)") << endmsg; continue; @@ -1813,7 +1813,7 @@ Session::load_nested_sources (const XMLNode& node) boost::shared_ptr<Region> Session::XMLRegionFactory (const XMLNode& node, bool full) { - const XMLProperty* type = node.property("type"); + XMLProperty const * type = node.property("type"); try { @@ -1842,7 +1842,7 @@ Session::XMLRegionFactory (const XMLNode& node, bool full) boost::shared_ptr<AudioRegion> Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/) { - const XMLProperty* prop; + XMLProperty const * prop; boost::shared_ptr<Source> source; boost::shared_ptr<AudioSource> as; SourceList sources; @@ -1961,7 +1961,7 @@ Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/) boost::shared_ptr<MidiRegion> Session::XMLMidiRegionFactory (const XMLNode& node, bool /*full*/) { - const XMLProperty* prop; + XMLProperty const * prop; boost::shared_ptr<Source> source; boost::shared_ptr<MidiSource> ms; SourceList sources; @@ -2793,7 +2793,7 @@ Session::find_all_sources (string path, set<string>& result) for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*niter)->property (X_("type"))) == 0) { continue; @@ -4230,27 +4230,29 @@ Session::get_info_from_path (const string& xmlpath, float& sample_rate, SampleFo /* sample rate */ - const XMLProperty* prop; - if ((prop = tree.root()->property (X_("sample-rate"))) != 0) { + XMLProperty const * prop; + XMLNode const * root (tree.root()); + + if ((prop = root->property (X_("sample-rate"))) != 0) { sample_rate = atoi (prop->value()); found_sr = true; } - const XMLNodeList& children (tree.root()->children()); + const XMLNodeList& children (root->children()); for (XMLNodeList::const_iterator c = children.begin(); c != children.end(); ++c) { const XMLNode* child = *c; if (child->name() == "Config") { const XMLNodeList& options (child->children()); for (XMLNodeList::const_iterator oc = options.begin(); oc != options.end(); ++oc) { - const XMLNode* option = *oc; - const XMLProperty* name = option->property("name"); + XMLNode const * option = *oc; + XMLProperty const * name = option->property("name"); if (!name) { continue; } if (name->value() == "native-file-data-format") { - const XMLProperty* value = option->property ("value"); + XMLProperty const * value = option->property ("value"); if (value) { SampleFormat fmt = (SampleFormat) string_2_enum (option->property ("value")->value(), fmt); data_format = fmt; @@ -4282,7 +4284,7 @@ Session::get_snapshot_from_instant (const std::string& session_dir) return ""; } - const XMLProperty* prop; + XMLProperty const * prop; XMLNode *last_used_snapshot = tree.root()->child("LastUsedSnapshot"); if (last_used_snapshot && (prop = last_used_snapshot->property ("name")) != 0) { return prop->value(); diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index aaa50ff297..ee32e508e2 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -113,7 +113,7 @@ Source::get_state () int Source::set_state (const XMLNode& node, int version) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property ("name")) != 0) { _name = prop->value(); diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc index 76975354cb..45b39802cb 100644 --- a/libs/ardour/source_factory.cc +++ b/libs/ardour/source_factory.cc @@ -150,7 +150,7 @@ boost::shared_ptr<Source> SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) { DataType type = DataType::AUDIO; - const XMLProperty* prop = node.property("type"); + XMLProperty const * prop = node.property("type"); if (prop) { type = DataType (prop->value()); diff --git a/libs/ardour/speakers.cc b/libs/ardour/speakers.cc index 7c7b02f0cc..7abdaf3a42 100644 --- a/libs/ardour/speakers.cc +++ b/libs/ardour/speakers.cc @@ -267,7 +267,7 @@ int Speakers::set_state (const XMLNode& node, int /*version*/) { XMLNodeConstIterator i; - const XMLProperty* prop; + XMLProperty const * prop; double a, e, d; LocaleGuard lg (X_("C")); int n = 0; diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 2a0ac50cc2..31e2f9a611 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -72,7 +72,7 @@ const string TempoSection::xml_state_node_name = "Tempo"; TempoSection::TempoSection (const XMLNode& node) : MetricSection (BBT_Time()), Tempo (TempoMap::default_tempo()) { - const XMLProperty *prop; + XMLProperty const * prop; BBT_Time start; LocaleGuard lg (X_("C")); @@ -194,7 +194,7 @@ const string MeterSection::xml_state_node_name = "Meter"; MeterSection::MeterSection (const XMLNode& node) : MetricSection (BBT_Time()), Meter (TempoMap::default_meter()) { - const XMLProperty *prop; + XMLProperty const * prop; BBT_Time start; LocaleGuard lg (X_("C")); diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index f279eae306..ac9b616ffb 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -134,7 +134,7 @@ Track::set_state (const XMLNode& node, int version) for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) { child = *niter; - XMLProperty* prop; + XMLProperty const * prop; if (child->name() == Controllable::xml_node_name && (prop = child->property ("name")) != 0) { if (prop->value() == X_("recenable")) { _rec_enable_control->set_state (*child, version); @@ -142,7 +142,7 @@ Track::set_state (const XMLNode& node, int version) } } - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("monitoring"))) != 0) { _monitoring = MonitorChoice (string_2_enum (prop->value(), _monitoring)); diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 4c2f0f9b15..1afdc27b67 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -377,7 +377,7 @@ VSTPlugin::load_user_preset (PresetRecord r) XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * label = (*i)->property (X_("label")); assert (label); @@ -411,8 +411,8 @@ VSTPlugin::load_user_preset (PresetRecord r) for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) { if ((*j)->name() == X_("Parameter")) { - XMLProperty* index = (*j)->property (X_("index")); - XMLProperty* value = (*j)->property (X_("value")); + XMLProperty const * index = (*j)->property (X_("index")); + XMLProperty const * value = (*j)->property (X_("value")); assert (index); assert (value); @@ -704,8 +704,8 @@ VSTPlugin::find_presets () XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* uri = (*i)->property (X_("uri")); - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * uri = (*i)->property (X_("uri")); + XMLProperty const * label = (*i)->property (X_("label")); assert (uri); assert (label); diff --git a/libs/ardour/windows_vst_plugin.cc b/libs/ardour/windows_vst_plugin.cc index a480642e3a..9dec5ea772 100644 --- a/libs/ardour/windows_vst_plugin.cc +++ b/libs/ardour/windows_vst_plugin.cc @@ -115,8 +115,8 @@ WindowsVSTPluginInfo::get_presets (bool user_only) const if (t->read ()) { XMLNode* root = t->root (); for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) { - XMLProperty* uri = (*i)->property (X_("uri")); - XMLProperty* label = (*i)->property (X_("label")); + XMLProperty const * uri = (*i)->property (X_("uri")); + XMLProperty const * label = (*i)->property (X_("label")); p.push_back (Plugin::PresetRecord (uri->value(), label->value(), true)); } } diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc index 7b52882f5f..deac345418 100644 --- a/libs/gtkmm2ext/bindings.cc +++ b/libs/gtkmm2ext/bindings.cc @@ -709,13 +709,14 @@ Bindings::load_operation (XMLNode const& node) for (XMLNodeList::const_iterator p = children.begin(); p != children.end(); ++p) { - XMLProperty* ap; - XMLProperty* kp; - XMLProperty* bp; - - ap = (*p)->property ("action"); - kp = (*p)->property ("key"); - bp = (*p)->property ("button"); + XMLProperty const * ap; + XMLProperty const * kp; + XMLProperty const * bp; + XMLNode const * child = *p; + + ap = child->property ("action"); + kp = child->property ("key"); + bp = child->property ("button"); if (!ap || (!kp && !bp)) { continue; 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; diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/gtkmm2ext/tabbable.cc index e0058c11f4..b84de2b10d 100644 --- a/libs/gtkmm2ext/tabbable.cc +++ b/libs/gtkmm2ext/tabbable.cc @@ -352,7 +352,7 @@ Tabbable::set_state (const XMLNode& node, int version) XMLNode* window_node = node.child ("Window"); if (window_node) { - const XMLProperty* prop = window_node->property (X_("tabbed")); + XMLProperty const * prop = window_node->property (X_("tabbed")); if (prop) { tab_requested_by_state = PBD::string_is_affirmative (prop->value()); } diff --git a/libs/gtkmm2ext/tearoff.cc b/libs/gtkmm2ext/tearoff.cc index dbe5c3dc5c..c107bd988a 100644 --- a/libs/gtkmm2ext/tearoff.cc +++ b/libs/gtkmm2ext/tearoff.cc @@ -286,7 +286,7 @@ void TearOff::set_state (const XMLNode& node) { Glib::RefPtr<Gdk::Window> win; - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = node.property (X_("tornoff"))) == 0) { return; diff --git a/libs/gtkmm2ext/window_proxy.cc b/libs/gtkmm2ext/window_proxy.cc index d859c730c0..28ec4fb28d 100644 --- a/libs/gtkmm2ext/window_proxy.cc +++ b/libs/gtkmm2ext/window_proxy.cc @@ -84,12 +84,13 @@ int WindowProxy::set_state (const XMLNode& node, int /* version */) { XMLNodeList children = node.children (); - + XMLNode const * child; XMLNodeList::const_iterator i = children.begin (); while (i != children.end()) { - XMLProperty* prop = (*i)->property (X_("name")); - if ((*i)->name() == X_("Window") && prop && prop->value() == _name) { + child = *i; + XMLProperty const * prop = child->property (X_("name")); + if (child->name() == X_("Window") && prop && prop->value() == _name) { break; } @@ -98,22 +99,23 @@ WindowProxy::set_state (const XMLNode& node, int /* version */) if (i != children.end()) { - XMLProperty* prop; + XMLProperty const * prop; + child = *i; - if ((prop = (*i)->property (X_("visible"))) != 0) { + if ((prop = child->property (X_("visible"))) != 0) { _visible = PBD::string_is_affirmative (prop->value ()); } - if ((prop = (*i)->property (X_("x-off"))) != 0) { + if ((prop = child->property (X_("x-off"))) != 0) { _x_off = atoi (prop->value()); } - if ((prop = (*i)->property (X_("y-off"))) != 0) { + if ((prop = child->property (X_("y-off"))) != 0) { _y_off = atoi (prop->value()); } - if ((prop = (*i)->property (X_("x-size"))) != 0) { + if ((prop = child->property (X_("x-size"))) != 0) { _width = atoi (prop->value()); } - if ((prop = (*i)->property (X_("y-size"))) != 0) { + if ((prop = child->property (X_("y-size"))) != 0) { _height = atoi (prop->value()); } } diff --git a/libs/pbd/configuration_variable.cc b/libs/pbd/configuration_variable.cc index cacad87d9a..578114e92a 100644 --- a/libs/pbd/configuration_variable.cc +++ b/libs/pbd/configuration_variable.cc @@ -47,7 +47,7 @@ ConfigVariableBase::set_from_node (XMLNode const & node) const XMLProperty* prop; XMLNodeList nlist; XMLNodeConstIterator niter; - XMLNode* child; + XMLNode const * child; nlist = node.children(); diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h index 0ba42b8e55..c97b4722ae 100644 --- a/libs/pbd/pbd/properties.h +++ b/libs/pbd/pbd/properties.h @@ -236,8 +236,8 @@ public: if (i == children.end()) { return 0; } - XMLProperty* from = (*i)->property ("from"); - XMLProperty* to = (*i)->property ("to"); + XMLProperty const * from = (*i)->property ("from"); + XMLProperty const * to = (*i)->property ("to"); if (!from || !to) { return 0; diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index 1f8b710f3f..f0956edd25 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -117,10 +117,10 @@ public: std::string attribute_value(); const XMLPropertyList& properties() const { return _proplist; } - XMLProperty* property(const char*); - XMLProperty* property(const std::string&); - const XMLProperty* property(const char* n) const { return const_cast<XMLNode*>(this)->property(n); } - const XMLProperty* property(const std::string& n) const { return const_cast<XMLNode*>(this)->property(n); } + XMLProperty const * property(const char*) const; + XMLProperty const * property(const std::string&) const; + XMLProperty * property(const char*); + XMLProperty * property(const std::string&); bool has_property_with_value (const std::string&, const std::string&) const; diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index 580ad8dc8b..80fc88242d 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -6,7 +6,10 @@ */ #include <iostream> + +#include "pbd/stacktrace.h" #include "pbd/xml++.h" + #include <libxml/debugXML.h> #include <libxml/xpath.h> #include <libxml/xpathInternals.h> @@ -404,7 +407,32 @@ XMLNode::add_content(const string& c) return add_child_copy(XMLNode (string(), c)); } -XMLProperty* +XMLProperty const * +XMLNode::property(const char* n) const +{ + string ns(n); + map<string,XMLProperty*>::const_iterator iter; + + if ((iter = _propmap.find(ns)) != _propmap.end()) { + return iter->second; + } + + return 0; +} + +XMLProperty const * +XMLNode::property(const string& ns) const +{ + map<string,XMLProperty*>::const_iterator iter; + + if ((iter = _propmap.find(ns)) != _propmap.end()) { + return iter->second; + } + + return 0; +} + +XMLProperty * XMLNode::property(const char* n) { string ns(n); @@ -417,7 +445,7 @@ XMLNode::property(const char* n) return 0; } -XMLProperty* +XMLProperty * XMLNode::property(const string& ns) { map<string,XMLProperty*>::iterator iter; @@ -534,7 +562,7 @@ void XMLNode::remove_nodes_and_delete(const string& propname, const string& val) { XMLNodeIterator i = _children.begin(); - XMLProperty* prop; + XMLProperty const * prop; while (i != _children.end()) { prop = (*i)->property(propname); diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index e319f65e1f..ec6e82222f 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -168,7 +168,7 @@ GenericMidiControlProtocol::reload_maps () MapInfo mi; - XMLProperty* prop = tree.root()->property ("name"); + XMLProperty const * prop = tree.root()->property ("name"); if (!prop) { continue; diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index a898746112..1ee5d95e07 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -867,7 +867,7 @@ MackieControlProtocol::create_surfaces () XMLNode* this_device = 0; XMLNodeList const& devices = configuration_state->children(); for (XMLNodeList::const_iterator d = devices.begin(); d != devices.end(); ++d) { - XMLProperty* prop = (*d)->property (X_("name")); + XMLProperty const * prop = (*d)->property (X_("name")); if (prop && prop->value() == _device_info.name()) { this_device = *d; break; |