Commit 472e4bfd authored by Max Kellermann's avatar Max Kellermann

client/List: fold CloseAll() into destructor

parent d3d70a7e
......@@ -22,6 +22,11 @@
#include <assert.h>
ClientList::~ClientList() noexcept
{
list.clear_and_dispose(DeleteDisposer());
}
void
ClientList::Remove(Client &client) noexcept
{
......@@ -31,12 +36,6 @@ ClientList::Remove(Client &client) noexcept
}
void
ClientList::CloseAll() noexcept
{
list.clear_and_dispose(DeleteDisposer());
}
void
ClientList::IdleAdd(unsigned flags) noexcept
{
assert(flags != 0);
......
......@@ -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;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment