mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 20:43: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
|
|
@ -36,22 +36,22 @@ public:
|
|||
ArrowItem(Player *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &color);
|
||||
~ArrowItem() override;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
QRectF boundingRect() const override
|
||||
[[nodiscard]] QRectF boundingRect() const override
|
||||
{
|
||||
return path.boundingRect();
|
||||
}
|
||||
QPainterPath shape() const override
|
||||
[[nodiscard]] QPainterPath shape() const override
|
||||
{
|
||||
return path;
|
||||
}
|
||||
void updatePath();
|
||||
void updatePath(const QPointF &endPoint);
|
||||
|
||||
int getId() const
|
||||
[[nodiscard]] int getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
Player *getPlayer() const
|
||||
[[nodiscard]] Player *getPlayer() const
|
||||
{
|
||||
return player;
|
||||
}
|
||||
|
|
@ -63,11 +63,11 @@ public:
|
|||
{
|
||||
targetItem = _item;
|
||||
}
|
||||
ArrowTarget *getStartItem() const
|
||||
[[nodiscard]] ArrowTarget *getStartItem() const
|
||||
{
|
||||
return startItem;
|
||||
}
|
||||
ArrowTarget *getTargetItem() const
|
||||
[[nodiscard]] ArrowTarget *getTargetItem() const
|
||||
{
|
||||
return targetItem;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue