]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/listener.h
Various fixes of issues reported by static analyzers.
[stg.git] / projects / rscriptd / listener.h
index c6fb143a05c3104aeba54530ef9f1c12e296c31c..22b029b663f67704676e96bedde0911ce4072702 100644 (file)
@@ -56,7 +56,7 @@ struct AliveData : public UserData
 
 class IsNotTimedOut : public std::unary_function<const AliveData &, bool> {
     public:
-        IsNotTimedOut(double to) : timeout(to), now(time(NULL)) {}
+        explicit IsNotTimedOut(double to) : timeout(to), now(time(NULL)) {}
         bool operator()(const AliveData & data) const
         {
             return difftime(now, data.lastAlive) < timeout;
@@ -133,7 +133,7 @@ private:
 
 class DisconnectUser : public std::unary_function<const UserData &, void> {
     public:
-        DisconnectUser(LISTENER & l) : listener(l) {};
+        explicit DisconnectUser(LISTENER & l) : listener(l) {};
         void operator()(const UserData & data)
         {
             listener.Disconnect(data);