util/DeleteDisposer: new utility class
This commit is contained in:
@@ -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 */
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user