diff --git a/src/client/List.cxx b/src/client/List.cxx index 926a3ad2c..f1a753d39 100644 --- a/src/client/List.cxx +++ b/src/client/List.cxx @@ -22,6 +22,11 @@ #include +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 { diff --git a/src/client/List.hxx b/src/client/List.hxx index 093ae3a47..9a0202f8e 100644 --- a/src/client/List.hxx +++ b/src/client/List.hxx @@ -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; };