]> git.stg.codes - stg.git/blobdiff - projects/stargazer/traffcounter_impl.h
Merge pull request #2 from bobr-kun/MySQL_custom_port
[stg.git] / projects / stargazer / traffcounter_impl.h
index 12439313e9a05a9cdb10afb817da7777f303776f..86d8c3898780b481c0355c34385cfabdaaae8469 100644 (file)
 #ifndef TRAFFCOUNTER_IMPL_H
 #define TRAFFCOUNTER_IMPL_H
 
-#include <pthread.h>
-
-#include <ctime>
-#include <list>
-#include <map>
-#include <string>
-
 #include "stg/traffcounter.h"
 #include "stg/os_int.h"
 #include "stg/logger.h"
 #include "eventloop.h"
 #include "user_impl.h"
 
+#include <ctime>
+#include <list>
+#include <map>
+#include <string>
+
+#include <pthread.h>
+
 #define PROTOMAX    (5)
 
 class USERS_IMPL;
@@ -73,19 +73,6 @@ PACKET_EXTRA_DATA()
       lenD(0)
 {}
 
-PACKET_EXTRA_DATA(const PACKET_EXTRA_DATA & pp)
-    : flushTime(pp.flushTime),
-      updateTime(pp.updateTime),
-      userU(pp.userU),
-      userUPresent(pp.userUPresent),
-      userD(pp.userD),
-      userDPresent(pp.userDPresent),
-      dirU(pp.dirU),
-      dirD(pp.dirD),
-      lenU(pp.lenU),
-      lenD(pp.lenD)
-{}
-
 time_t      flushTime;          // Last flush time
 time_t      updateTime;         // Last update time
 USER_IMPL * userU;              // Uploader
@@ -147,7 +134,7 @@ private:
 //-----------------------------------------------------------------------------
 class ADD_USER_NONIFIER: public NOTIFIER_BASE<USER_IMPL_PTR> {
 public:
-            ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
+            explicit ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
                 NOTIFIER_BASE<USER_IMPL_PTR>(),
                 traffCnt(t)
             {}
@@ -163,7 +150,7 @@ private:
 //-----------------------------------------------------------------------------
 class DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_IMPL_PTR> {
 public:
-            DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
+            explicit DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) :
                 NOTIFIER_BASE<USER_IMPL_PTR>(),
                 traffCnt(t)
             {}
@@ -196,8 +183,8 @@ public:
     size_t      RulesCount() const { return rules.size(); }
 
 private:
-    TRAFFCOUNTER_IMPL(const TRAFFCOUNTER_IMPL & rvalue);
-    TRAFFCOUNTER_IMPL & operator=(const TRAFFCOUNTER_IMPL & rvalue);
+    TRAFFCOUNTER_IMPL(const TRAFFCOUNTER_IMPL &);
+    TRAFFCOUNTER_IMPL & operator=(const TRAFFCOUNTER_IMPL &);
 
     bool        ParseAddress(const char * ta, RULE * rule) const;
     uint32_t    CalcMask(uint32_t msk) const;