add missing override and explicit specifiers in common (#5527)

This commit is contained in:
RickyRister 2025-01-25 06:06:03 -08:00 committed by GitHub
parent b911ea6e28
commit aee68f8b00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 11 deletions

View file

@ -8,7 +8,7 @@ class RNG_Abstract : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
RNG_Abstract(QObject *parent = 0) : QObject(parent) explicit RNG_Abstract(QObject *parent = nullptr) : QObject(parent)
{ {
} }
virtual unsigned int rand(int min, int max) = 0; virtual unsigned int rand(int min, int max) = 0;

View file

@ -36,8 +36,8 @@ private:
unsigned int cdf(unsigned int min, unsigned int max); unsigned int cdf(unsigned int min, unsigned int max);
public: public:
RNG_SFMT(QObject *parent = 0); explicit RNG_SFMT(QObject *parent = nullptr);
unsigned int rand(int min, int max); unsigned int rand(int min, int max) override;
}; };
#endif #endif

View file

@ -58,7 +58,7 @@ private slots:
public: public:
mutable QReadWriteLock clientsLock, roomsLock; // locking order: roomsLock before clientsLock mutable QReadWriteLock clientsLock, roomsLock; // locking order: roomsLock before clientsLock
explicit Server(QObject *parent = nullptr); explicit Server(QObject *parent = nullptr);
virtual ~Server() = default; ~Server() override = default;
AuthenticationResult loginUser(Server_ProtocolHandler *session, AuthenticationResult loginUser(Server_ProtocolHandler *session,
QString &name, QString &name,
const QString &password, const QString &password,

View file

@ -26,14 +26,14 @@ protected:
Server *server; Server *server;
public: public:
Server_AbstractUserInterface(Server *_server) : server(_server) explicit Server_AbstractUserInterface(Server *_server) : server(_server)
{ {
} }
Server_AbstractUserInterface(Server *_server, const ServerInfo_User_Container &other) Server_AbstractUserInterface(Server *_server, const ServerInfo_User_Container &other)
: ServerInfo_User_Container(other), server(_server) : ServerInfo_User_Container(other), server(_server)
{ {
} }
virtual ~Server_AbstractUserInterface() ~Server_AbstractUserInterface() override
{ {
} }

View file

@ -9,7 +9,7 @@ class Server_DatabaseInterface : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
Server_DatabaseInterface(QObject *parent = 0) : QObject(parent) explicit Server_DatabaseInterface(QObject *parent = nullptr) : QObject(parent)
{ {
} }

View file

@ -108,7 +108,7 @@ public:
bool _spectatorsSeeEverything, bool _spectatorsSeeEverything,
int startingLifeTotal, int startingLifeTotal,
Server_Room *parent); Server_Room *parent);
~Server_Game(); ~Server_Game() override;
Server_Room *getRoom() const Server_Room *getRoom() const
{ {
return room; return room;

View file

@ -64,7 +64,7 @@ public:
const QString &_joinMessage, const QString &_joinMessage,
const QStringList &_gameTypes, const QStringList &_gameTypes,
Server *parent); Server *parent);
~Server_Room(); ~Server_Room() override;
int getId() const int getId() const
{ {
return id; return id;

View file

@ -9,8 +9,8 @@ protected:
ServerInfo_User *userInfo; ServerInfo_User *userInfo;
public: public:
ServerInfo_User_Container(ServerInfo_User *_userInfo = nullptr); explicit ServerInfo_User_Container(ServerInfo_User *_userInfo = nullptr);
ServerInfo_User_Container(const ServerInfo_User &_userInfo); explicit ServerInfo_User_Container(const ServerInfo_User &_userInfo);
ServerInfo_User_Container(const ServerInfo_User_Container &other); ServerInfo_User_Container(const ServerInfo_User_Container &other);
ServerInfo_User_Container &operator=(const ServerInfo_User_Container &other) = default; ServerInfo_User_Container &operator=(const ServerInfo_User_Container &other) = default;
virtual ~ServerInfo_User_Container(); virtual ~ServerInfo_User_Container();