X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/02f215c550418f180d0d1b2694c99a7a8d4dc4b2..bbdaa9a6451f7057a587b5a8e7a9acd54e6462c1:/projects/rscriptd/listener.h diff --git a/projects/rscriptd/listener.h b/projects/rscriptd/listener.h index f4d2856e..22b029b6 100644 --- a/projects/rscriptd/listener.h +++ b/projects/rscriptd/listener.h @@ -56,7 +56,7 @@ struct AliveData : public UserData class IsNotTimedOut : public std::unary_function { 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 { public: - DisconnectUser(LISTENER & l) : listener(l) {}; + explicit DisconnectUser(LISTENER & l) : listener(l) {}; void operator()(const UserData & data) { listener.Disconnect(data);