Use 'const_iterator' to prevent MSVC from complaining
authorJohn Emmas <johne53@tiscali.co.uk>
Tue, 26 Apr 2016 13:58:16 +0000 (14:58 +0100)
committerJohn Emmas <johne53@tiscali.co.uk>
Tue, 26 Apr 2016 13:58:16 +0000 (14:58 +0100)
libs/backends/dummy/dummy_audiobackend.cc

index 91efd79a495f2226b120374f2e79c60da32cf386..50cc88b0f52a2c6d57ccb4fab61c79389b4e52c1 100644 (file)
@@ -727,7 +727,7 @@ DummyAudioBackend::get_ports (
                }
        }
 
-       for (PortIndex::iterator i = _ports.begin (); i != _ports.end (); ++i) {
+       for (PortIndex::const_iterator i = _ports.begin (); i != _ports.end (); ++i) {
                DummyPort* port = *i;
                if ((port->type () == type) && flags == (port->flags () & flags)) {
                        if (!use_regexp || !regexec (&port_regex, port->name ().c_str (), 0, NULL, 0)) {
@@ -1227,7 +1227,7 @@ DummyAudioBackend::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) {
                DummyPort* port = *i;
                if (port->is_output () && port->is_physical ()) {
                        switch (port->type ()) {
@@ -1248,7 +1248,7 @@ DummyAudioBackend::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) {
                DummyPort* port = *i;
                if (port->is_input () && port->is_physical ()) {
                        switch (port->type ()) {