]> 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 f4d2856e7c7b0cdd35d3821d3278b396fd49b5c0..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;
@@ -96,7 +96,7 @@ private:
     bool                FinalizeNet();
     bool                RecvPacket();
     // Parsing stuff
-    bool                CheckHeader(const RS_PACKET_HEADER & header) const;
+    bool                CheckHeader(const RS::PACKET_HEADER & header) const;
     bool                GetParams(char * buffer, UserData & data);
     // Processing stuff
     void                ProcessPending();
@@ -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);