mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-18 04:51:33 -07:00
Mark more functions as [[nodiscard]] (#6320)
* Fix local variable double declaration. Took 44 seconds * Mark functions as [[nodiscard]] Took 31 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
27708d5964
commit
73763b5ee6
65 changed files with 258 additions and 257 deletions
|
|
@ -64,8 +64,8 @@ class CloseButton : public QAbstractButton
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit CloseButton(QWidget *parent = nullptr);
|
||||
QSize sizeHint() const override;
|
||||
inline QSize minimumSizeHint() const override
|
||||
[[nodiscard]] QSize sizeHint() const override;
|
||||
[[nodiscard]] QSize minimumSizeHint() const override
|
||||
{
|
||||
return sizeHint();
|
||||
}
|
||||
|
|
@ -129,36 +129,36 @@ public:
|
|||
void start(const ServerInfo_User &userInfo);
|
||||
void startLocal(const QList<AbstractClient *> &_clients);
|
||||
void stop();
|
||||
bool getIsLocalGame() const
|
||||
[[nodiscard]] bool getIsLocalGame() const
|
||||
{
|
||||
return isLocalGame;
|
||||
}
|
||||
int getGameCount() const
|
||||
[[nodiscard]] int getGameCount() const
|
||||
{
|
||||
return gameTabs.size();
|
||||
}
|
||||
TabAccount *getTabAccount() const
|
||||
[[nodiscard]] TabAccount *getTabAccount() const
|
||||
{
|
||||
return tabAccount;
|
||||
}
|
||||
ServerInfo_User *getUserInfo() const
|
||||
[[nodiscard]] ServerInfo_User *getUserInfo() const
|
||||
{
|
||||
return userInfo;
|
||||
}
|
||||
AbstractClient *getClient() const;
|
||||
const UserListManager *getUserListManager() const
|
||||
[[nodiscard]] AbstractClient *getClient() const;
|
||||
[[nodiscard]] const UserListManager *getUserListManager() const
|
||||
{
|
||||
return userListManager;
|
||||
}
|
||||
const QMap<int, TabRoom *> &getRoomTabs() const
|
||||
[[nodiscard]] const QMap<int, TabRoom *> &getRoomTabs() const
|
||||
{
|
||||
return roomTabs;
|
||||
}
|
||||
QList<AbstractTabDeckEditor *> getDeckEditorTabs() const
|
||||
[[nodiscard]] QList<AbstractTabDeckEditor *> getDeckEditorTabs() const
|
||||
{
|
||||
return deckEditorTabs;
|
||||
}
|
||||
bool getAdminLocked() const;
|
||||
[[nodiscard]] bool getAdminLocked() const;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
bool switchToGameTabIfAlreadyExists(const int gameId);
|
||||
static void actShowPopup(const QString &message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue