erase from the map more efficiently

This commit is contained in:
Dana Jansens 2002-12-04 07:34:09 +00:00
parent 4f01802c8c
commit 925262bee2

View file

@ -265,10 +265,7 @@ void Openbox::addClient(Window window, OBClient *client)
void Openbox::removeClient(Window window)
{
_clients[window] = 0;
ClientMap::iterator it = _clients.find(window);
if (it != _clients.end())
_clients.erase(it);
_clients.erase(window);
}