diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2015-09-22 20:18:41 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2015-09-22 20:18:41 +0200 |
| commit | df43572fd5a2997b4b8ffcedc026fb400c990161 (patch) | |
| tree | 24a80e2c81ae7041cb36bc14beb84abfea86fb20 /src/ClientInfo.hpp | |
| parent | 1f5f2defd78714354e628cf1889235a6340f5625 (diff) | |
| download | manager-df43572fd5a2997b4b8ffcedc026fb400c990161.tar.gz manager-df43572fd5a2997b4b8ffcedc026fb400c990161.zip | |
Code cleanup
Add empty() and clear() to ClientInfo and use it when needed.
Move session-specific members into Session-struct
Diffstat (limited to 'src/ClientInfo.hpp')
| -rw-r--r-- | src/ClientInfo.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ClientInfo.hpp b/src/ClientInfo.hpp index cccff95..3371a18 100644 --- a/src/ClientInfo.hpp +++ b/src/ClientInfo.hpp @@ -116,4 +116,14 @@ public: antiFloodList.push_back(newDateTime); return antiFloodList.size() > maxCount; } + + inline bool empty() + { + return *this != ClientInfo(); + } + + inline void clear() + { + *this = ClientInfo(); + } }; |
