port 93eac8b0 to ALSA and CoreAudio
authorRobin Gareus <robin@gareus.org>
Tue, 26 Apr 2016 16:19:48 +0000 (18:19 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 26 Apr 2016 16:19:48 +0000 (18:19 +0200)
libs/backends/alsa/alsa_audiobackend.cc
libs/backends/coreaudio/coreaudio_backend.cc

index a3ba3f36c476f167720a03c317dcbe18a02f7c77..ed8254e3e3336358925852f79df2201198e36816 100644 (file)
@@ -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 ()) {
index b1721dd2d582f1f59804e67871f3f94336321a4f..f87282c995e13031f75d7788a271593f16c167b3 100644 (file)
@@ -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 ()) {