mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -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
|
|
@ -45,10 +45,10 @@ public:
|
|||
QGraphicsItem *parent = nullptr,
|
||||
QAction *_doubleClickAction = nullptr,
|
||||
bool _highlightable = true);
|
||||
QRectF boundingRect() const override;
|
||||
[[nodiscard]] QRectF boundingRect() const override;
|
||||
void setWidth(double _width);
|
||||
void setActive(bool _active);
|
||||
bool getActive() const
|
||||
[[nodiscard]] bool getActive() const
|
||||
{
|
||||
return active;
|
||||
}
|
||||
|
|
@ -77,18 +77,18 @@ private:
|
|||
|
||||
public:
|
||||
explicit PhasesToolbar(QGraphicsItem *parent = nullptr);
|
||||
QRectF boundingRect() const override;
|
||||
[[nodiscard]] QRectF boundingRect() const override;
|
||||
void retranslateUi();
|
||||
void setHeight(double _height);
|
||||
double getWidth() const
|
||||
[[nodiscard]] double getWidth() const
|
||||
{
|
||||
return width;
|
||||
}
|
||||
int phaseCount() const
|
||||
[[nodiscard]] int phaseCount() const
|
||||
{
|
||||
return buttonList.size();
|
||||
}
|
||||
QString getLongPhaseName(int phase) const;
|
||||
[[nodiscard]] QString getLongPhaseName(int phase) const;
|
||||
public slots:
|
||||
void setActivePhase(int phase);
|
||||
void triggerPhaseAction(int phase);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue