client/List: add noexcept
This commit is contained in:
parent
fe32db17d7
commit
41dc36ba92
@ -23,7 +23,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientList::Remove(Client &client)
|
ClientList::Remove(Client &client) noexcept
|
||||||
{
|
{
|
||||||
assert(!list.empty());
|
assert(!list.empty());
|
||||||
|
|
||||||
@ -31,13 +31,13 @@ ClientList::Remove(Client &client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientList::CloseAll()
|
ClientList::CloseAll() noexcept
|
||||||
{
|
{
|
||||||
list.clear_and_dispose(DeleteDisposer());
|
list.clear_and_dispose(DeleteDisposer());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientList::IdleAdd(unsigned flags)
|
ClientList::IdleAdd(unsigned flags) noexcept
|
||||||
{
|
{
|
||||||
assert(flags != 0);
|
assert(flags != 0);
|
||||||
|
|
||||||
|
@ -33,33 +33,34 @@ class ClientList {
|
|||||||
List list;
|
List list;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClientList(unsigned _max_size)
|
explicit ClientList(unsigned _max_size) noexcept
|
||||||
:max_size(_max_size) {}
|
:max_size(_max_size) {}
|
||||||
~ClientList() {
|
|
||||||
|
~ClientList() noexcept {
|
||||||
CloseAll();
|
CloseAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
List::iterator begin() {
|
List::iterator begin() noexcept {
|
||||||
return list.begin();
|
return list.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
List::iterator end() {
|
List::iterator end() noexcept {
|
||||||
return list.end();
|
return list.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsFull() const {
|
bool IsFull() const noexcept {
|
||||||
return list.size() >= max_size;
|
return list.size() >= max_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Add(Client &client) {
|
void Add(Client &client) noexcept {
|
||||||
list.push_front(client);
|
list.push_front(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Remove(Client &client);
|
void Remove(Client &client) noexcept;
|
||||||
|
|
||||||
void CloseAll();
|
void CloseAll() noexcept;
|
||||||
|
|
||||||
void IdleAdd(unsigned flags);
|
void IdleAdd(unsigned flags) noexcept;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user