X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/72229403aae25f742c07d07d625bdc1e313b401d..a6680ce3d763763a6010c81c8a5a8f7a1ce052db:/projects/stargazer/traffcounter_impl.h diff --git a/projects/stargazer/traffcounter_impl.h b/projects/stargazer/traffcounter_impl.h index 12439313..86d8c389 100644 --- a/projects/stargazer/traffcounter_impl.h +++ b/projects/stargazer/traffcounter_impl.h @@ -28,13 +28,6 @@ #ifndef TRAFFCOUNTER_IMPL_H #define TRAFFCOUNTER_IMPL_H -#include - -#include -#include -#include -#include - #include "stg/traffcounter.h" #include "stg/os_int.h" #include "stg/logger.h" @@ -45,6 +38,13 @@ #include "eventloop.h" #include "user_impl.h" +#include +#include +#include +#include + +#include + #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 { public: - ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : + explicit ADD_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : NOTIFIER_BASE(), traffCnt(t) {} @@ -163,7 +150,7 @@ private: //----------------------------------------------------------------------------- class DEL_USER_NONIFIER: public NOTIFIER_BASE { public: - DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : + explicit DEL_USER_NONIFIER(TRAFFCOUNTER_IMPL & t) : NOTIFIER_BASE(), 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;