From 17ace643e4edbec1e5bd7b446d039f8c94beef75 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 4 May 2016 23:09:37 -0400 Subject: OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) --- libs/ardour/audio_diskstream.cc | 4 +-- libs/ardour/audio_playlist.cc | 4 +-- libs/ardour/audio_playlist_importer.cc | 14 +++++----- libs/ardour/audio_playlist_source.cc | 2 +- libs/ardour/audio_region_importer.cc | 2 +- libs/ardour/audio_track.cc | 6 ++-- libs/ardour/audio_track_importer.cc | 6 ++-- libs/ardour/audio_unit.cc | 8 +++--- libs/ardour/audioregion.cc | 4 +-- libs/ardour/audiosource.cc | 2 +- libs/ardour/automatable.cc | 4 +-- libs/ardour/automation_list.cc | 4 +-- libs/ardour/control_protocol_manager.cc | 12 ++++---- libs/ardour/delivery.cc | 2 +- libs/ardour/diskstream.cc | 2 +- libs/ardour/element_importer.cc | 2 +- libs/ardour/engine_state_controller.cc | 6 ++-- libs/ardour/export_channel.cc | 2 +- libs/ardour/export_filename.cc | 4 +-- libs/ardour/export_format_specification.cc | 2 +- libs/ardour/export_preset.cc | 4 +-- libs/ardour/export_profile_manager.cc | 2 +- libs/ardour/file_source.cc | 2 +- libs/ardour/internal_send.cc | 2 +- libs/ardour/io.cc | 12 ++++---- libs/ardour/io_processor.cc | 6 ++-- libs/ardour/ladspa_plugin.cc | 4 +-- libs/ardour/location.cc | 2 +- libs/ardour/luaproc.cc | 16 +++++------ libs/ardour/lv2_plugin.cc | 2 +- libs/ardour/lxvst_plugin.cc | 4 +-- libs/ardour/midi_automation_list_binder.cc | 4 +-- libs/ardour/midi_model.cc | 12 ++++---- libs/ardour/midi_playlist.cc | 2 +- libs/ardour/midi_scene_change.cc | 2 +- libs/ardour/midi_source.cc | 2 +- libs/ardour/midi_track.cc | 4 +-- libs/ardour/midiport_manager.cc | 2 +- libs/ardour/monitor_processor.cc | 2 +- libs/ardour/mute_master.cc | 2 +- libs/ardour/pannable.cc | 4 +-- libs/ardour/panner_shell.cc | 2 +- libs/ardour/playlist.cc | 4 +-- libs/ardour/playlist_factory.cc | 2 +- libs/ardour/playlist_source.cc | 2 +- libs/ardour/plugin_insert.cc | 6 ++-- libs/ardour/port.cc | 2 +- libs/ardour/port_insert.cc | 2 +- libs/ardour/processor.cc | 6 ++-- libs/ardour/region.cc | 2 +- libs/ardour/return.cc | 2 +- libs/ardour/route.cc | 12 ++++---- libs/ardour/route_group.cc | 2 +- libs/ardour/scene_change.cc | 2 +- libs/ardour/send.cc | 2 +- libs/ardour/session.cc | 11 ++++---- libs/ardour/session_state.cc | 44 ++++++++++++++++-------------- libs/ardour/source.cc | 2 +- libs/ardour/source_factory.cc | 2 +- libs/ardour/speakers.cc | 2 +- libs/ardour/tempo.cc | 4 +-- libs/ardour/track.cc | 4 +-- libs/ardour/vst_plugin.cc | 10 +++---- libs/ardour/windows_vst_plugin.cc | 4 +-- 64 files changed, 160 insertions(+), 155 deletions(-) (limited to 'libs/ardour') 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 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 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 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 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_ptrproperty ("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::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 > 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; 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, bool> PlaylistFactory::PlaylistCr boost::shared_ptr 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 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 wp) bool Route::add_processor_from_xml_2X (const XMLNode& node, int version) { - const XMLProperty *prop; + XMLProperty const * prop; try { boost::shared_ptr 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::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 (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 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 Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/) { - const XMLProperty* prop; + XMLProperty const * prop; boost::shared_ptr source; boost::shared_ptr as; SourceList sources; @@ -1961,7 +1961,7 @@ Session::XMLAudioRegionFactory (const XMLNode& node, bool /*full*/) boost::shared_ptr Session::XMLMidiRegionFactory (const XMLNode& node, bool /*full*/) { - const XMLProperty* prop; + XMLProperty const * prop; boost::shared_ptr source; boost::shared_ptr ms; SourceList sources; @@ -2793,7 +2793,7 @@ Session::find_all_sources (string path, set& 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 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)); } } -- cgit v1.2.3