client/List: fold CloseAll() into destructor

This commit is contained in:
Max Kellermann 2019-05-29 21:33:22 +02:00
parent d3d70a7eed
commit 472e4bfd41
2 changed files with 6 additions and 11 deletions

View File

@ -22,6 +22,11 @@
#include <assert.h>
ClientList::~ClientList() noexcept
{
list.clear_and_dispose(DeleteDisposer());
}
void
ClientList::Remove(Client &client) noexcept
{
@ -30,12 +35,6 @@ ClientList::Remove(Client &client) noexcept
list.erase(list.iterator_to(client));
}
void
ClientList::CloseAll() noexcept
{
list.clear_and_dispose(DeleteDisposer());
}
void
ClientList::IdleAdd(unsigned flags) noexcept
{

View File

@ -36,9 +36,7 @@ public:
explicit ClientList(unsigned _max_size) noexcept
:max_size(_max_size) {}
~ClientList() noexcept {
CloseAll();
}
~ClientList() noexcept;
auto begin() noexcept {
return list.begin();
@ -58,8 +56,6 @@ public:
void Remove(Client &client) noexcept;
void CloseAll() noexcept;
void IdleAdd(unsigned flags) noexcept;
};