From ce052ba20a2dca049fa3afcc5c58b3d1c301272d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 24 Apr 2016 18:34:31 +0200 Subject: now with C++98 compat --- libs/backends/dummy/dummy_audiobackend.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libs/backends/dummy/dummy_audiobackend.cc') diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index 7bacd17e34..94ed1a0fd7 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -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); } -- cgit v1.2.3