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:
BruebachL 2025-11-16 01:39:24 +01:00 committed by GitHub
parent 27708d5964
commit 73763b5ee6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 258 additions and 257 deletions

View file

@ -28,18 +28,18 @@ public:
explicit ArrowTarget(Player *_owner, QGraphicsItem *parent = nullptr);
~ArrowTarget() override;
Player *getOwner() const
[[nodiscard]] Player *getOwner() const
{
return owner;
}
void setBeingPointedAt(bool _beingPointedAt);
bool getBeingPointedAt() const
[[nodiscard]] bool getBeingPointedAt() const
{
return beingPointedAt;
}
const QList<ArrowItem *> &getArrowsFrom() const
[[nodiscard]] const QList<ArrowItem *> &getArrowsFrom() const
{
return arrowsFrom;
}
@ -51,7 +51,7 @@ public:
{
arrowsFrom.removeOne(arrow);
}
const QList<ArrowItem *> &getArrowsTo() const
[[nodiscard]] const QList<ArrowItem *> &getArrowsTo() const
{
return arrowsTo;
}