diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index a3ba3f36c4..ed8254e3e3 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -1289,7 +1289,7 @@ AlsaAudioBackend::get_ports ( } } - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { AlsaPort* port = *i; if ((port->type () == type) && flags == (port->flags () & flags)) { if (!use_regexp || !regexec (&port_regex, port->name ().c_str (), 0, NULL, 0)) { @@ -1814,7 +1814,7 @@ AlsaAudioBackend::n_physical_outputs () const { int n_midi = 0; int n_audio = 0; - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { AlsaPort* port = *i; if (port->is_output () && port->is_physical ()) { switch (port->type ()) { @@ -1835,7 +1835,7 @@ AlsaAudioBackend::n_physical_inputs () const { int n_midi = 0; int n_audio = 0; - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { AlsaPort* port = *i; if (port->is_input () && port->is_physical ()) { switch (port->type ()) { diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index b1721dd2d5..f87282c995 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -981,7 +981,7 @@ CoreAudioBackend::get_ports ( } } - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { CoreBackendPort* port = *i; if ((port->type () == type) && flags == (port->flags () & flags)) { if (!use_regexp || !regexec (&port_regex, port->name ().c_str (), 0, NULL, 0)) { @@ -1512,7 +1512,7 @@ CoreAudioBackend::n_physical_outputs () const { int n_midi = 0; int n_audio = 0; - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { CoreBackendPort* port = *i; if (port->is_output () && port->is_physical ()) { switch (port->type ()) { @@ -1533,7 +1533,7 @@ CoreAudioBackend::n_physical_inputs () const { int n_midi = 0; int n_audio = 0; - for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) { + for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) { CoreBackendPort* port = *i; if (port->is_input () && port->is_physical ()) { switch (port->type ()) {