From df43572fd5a2997b4b8ffcedc026fb400c990161 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Tue, 22 Sep 2015 20:18:41 +0200 Subject: Code cleanup Add empty() and clear() to ClientInfo and use it when needed. Move session-specific members into Session-struct --- src/ClientInfo.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ClientInfo.hpp') 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(); + } }; -- cgit v1.2.3-54-g00ecf