]> git.stg.codes - stg.git/blobdiff - projects/stargazer/traffcounter_impl.h
Various fixes of issues reported by static analyzers.
[stg.git] / projects / stargazer / traffcounter_impl.h
index 12439313e9a05a9cdb10afb817da7777f303776f..a1dfa74303aa8a4844fcf443550a53b712b4b359 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;
@@ -147,7 +147,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 +163,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)
             {}