aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-19 15:57:00 +0200
committerMax Kellermann <max@duempel.org>2015-10-19 15:57:30 +0200
commit8d2370635408b9acd392843de96179383a95a4bf (patch)
tree7c1572bedb11ffea8eb8dfaa9a4c78a3e1c64d2f /src/client
parent62bfb1a2731ba6c7ee27009316109ef03a60d950 (diff)
downloadmpd-8d2370635408b9acd392843de96179383a95a4bf.tar.gz
mpd-8d2370635408b9acd392843de96179383a95a4bf.tar.xz
mpd-8d2370635408b9acd392843de96179383a95a4bf.zip
util/DeleteDisposer: new utility class
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Client.hxx6
-rw-r--r--src/client/ClientList.cxx5
2 files changed, 2 insertions, 9 deletions
diff --git a/src/client/Client.hxx b/src/client/Client.hxx
index 0e3047d58..38127b124 100644
--- a/src/client/Client.hxx
+++ b/src/client/Client.hxx
@@ -51,12 +51,6 @@ public:
struct playlist &playlist;
struct PlayerControl &player_control;
- struct Disposer {
- void operator()(Client *client) const {
- delete client;
- }
- };
-
unsigned permission;
/** the uid of the client process, or -1 if unknown */
diff --git a/src/client/ClientList.cxx b/src/client/ClientList.cxx
index 43a35798f..375e99090 100644
--- a/src/client/ClientList.cxx
+++ b/src/client/ClientList.cxx
@@ -20,8 +20,7 @@
#include "config.h"
#include "ClientList.hxx"
#include "ClientInternal.hxx"
-
-#include <algorithm>
+#include "util/DeleteDisposer.hxx"
#include <assert.h>
@@ -36,7 +35,7 @@ ClientList::Remove(Client &client)
void
ClientList::CloseAll()
{
- list.clear_and_dispose(Client::Disposer());
+ list.clear_and_dispose(DeleteDisposer());
}
void