client/List: fold CloseAll() into destructor
This commit is contained in:
parent
d3d70a7eed
commit
472e4bfd41
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user