client/List: fold CloseAll() into destructor
This commit is contained in:
parent
d3d70a7eed
commit
472e4bfd41
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
ClientList::~ClientList() noexcept
|
||||||
|
{
|
||||||
|
list.clear_and_dispose(DeleteDisposer());
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientList::Remove(Client &client) noexcept
|
ClientList::Remove(Client &client) noexcept
|
||||||
{
|
{
|
||||||
@ -30,12 +35,6 @@ ClientList::Remove(Client &client) noexcept
|
|||||||
list.erase(list.iterator_to(client));
|
list.erase(list.iterator_to(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ClientList::CloseAll() noexcept
|
|
||||||
{
|
|
||||||
list.clear_and_dispose(DeleteDisposer());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientList::IdleAdd(unsigned flags) noexcept
|
ClientList::IdleAdd(unsigned flags) noexcept
|
||||||
{
|
{
|
||||||
|
@ -36,9 +36,7 @@ public:
|
|||||||
explicit ClientList(unsigned _max_size) noexcept
|
explicit ClientList(unsigned _max_size) noexcept
|
||||||
:max_size(_max_size) {}
|
:max_size(_max_size) {}
|
||||||
|
|
||||||
~ClientList() noexcept {
|
~ClientList() noexcept;
|
||||||
CloseAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto begin() noexcept {
|
auto begin() noexcept {
|
||||||
return list.begin();
|
return list.begin();
|
||||||
@ -58,8 +56,6 @@ public:
|
|||||||
|
|
||||||
void Remove(Client &client) noexcept;
|
void Remove(Client &client) noexcept;
|
||||||
|
|
||||||
void CloseAll() noexcept;
|
|
||||||
|
|
||||||
void IdleAdd(unsigned flags) noexcept;
|
void IdleAdd(unsigned flags) noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user