From 925262bee2d1edfbec1c3fb1725f09cc926b4c7d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 4 Dec 2002 07:34:09 +0000 Subject: [PATCH 1/1] erase from the map more efficiently --- src/openbox.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/openbox.cc b/src/openbox.cc index d17a5500..d95de520 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -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); } -- 2.45.2