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
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;

View file

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

View file

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

View file

@ -26,14 +26,14 @@ protected:
Server *server;
public:
Server_AbstractUserInterface(Server *_server) : server(_server)
explicit Server_AbstractUserInterface(Server *_server) : server(_server)
{
}
Server_AbstractUserInterface(Server *_server, const ServerInfo_User_Container &other)
: 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
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,
int startingLifeTotal,
Server_Room *parent);
~Server_Game();
~Server_Game() override;
Server_Room *getRoom() const
{
return room;

View file

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

View file

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