now with C++98 compat
authorRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:34:31 +0000 (18:34 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:34:31 +0000 (18:34 +0200)
libs/backends/dummy/dummy_audiobackend.cc

index 7bacd17e34fa35d55e19b504f11475933ebeabc1..94ed1a0fd74e2478563406b18d88e63434626a69 100644 (file)
@@ -797,10 +797,7 @@ DummyAudioBackend::unregister_port (PortEngine::PortHandle port_handle)
                return;
        }
        disconnect_all(port_handle);
-       PortMap::const_iterator it = _portmap.find ((*i)->name());
-       if (it != _portmap.end()) {
-               _portmap.erase (it);
-       }
+       _portmap.erase (port->name());
        _ports.erase (i);
        delete port;
 }
@@ -921,10 +918,7 @@ DummyAudioBackend::unregister_ports (bool system_only)
                DummyPort* port = *cur;
                if (! system_only || (port->is_physical () && port->is_terminal ())) {
                        port->disconnect_all ();
-                       PortMap::const_iterator it = _portmap.find (port->name());
-                       if (it != _portmap.end()) {
-                               _portmap.erase (it);
-                       }
+                       _portmap.erase (port->name());
                        delete port;
                        _ports.erase (cur);
                }