summaryrefslogtreecommitdiffstats
path: root/src/ClientInfo.hpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2015-09-22 20:18:41 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2015-09-22 20:18:41 +0200
commitdf43572fd5a2997b4b8ffcedc026fb400c990161 (patch)
tree24a80e2c81ae7041cb36bc14beb84abfea86fb20 /src/ClientInfo.hpp
parent1f5f2defd78714354e628cf1889235a6340f5625 (diff)
downloadmanager-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.hpp10
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();
+ }
};