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;
}
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);
}