mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 19:13:55 -07:00
[Fix-Warnings] Mark const getters as [[nodiscard]] (#6365)
Took 45 minutes Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
a1a3b02d3a
commit
9ece4bfd9b
58 changed files with 548 additions and 543 deletions
|
|
@ -91,7 +91,7 @@ public:
|
|||
explicit DecklistCardNode(DecklistCardNode *other, InnerDecklistNode *_parent);
|
||||
|
||||
/// @return The quantity of this card.
|
||||
int getNumber() const override
|
||||
[[nodiscard]] int getNumber() const override
|
||||
{
|
||||
return number;
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
}
|
||||
|
||||
/// @return The display name of this card.
|
||||
QString getName() const override
|
||||
[[nodiscard]] QString getName() const override
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
}
|
||||
|
||||
/// @return The provider identifier for this card.
|
||||
QString getCardProviderId() const override
|
||||
[[nodiscard]] QString getCardProviderId() const override
|
||||
{
|
||||
return cardProviderId;
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ public:
|
|||
}
|
||||
|
||||
/// @return The short set code (e.g., "NEO").
|
||||
QString getCardSetShortName() const override
|
||||
[[nodiscard]] QString getCardSetShortName() const override
|
||||
{
|
||||
return cardSetShortName;
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ public:
|
|||
}
|
||||
|
||||
/// @return The collector number of this card within its set.
|
||||
QString getCardCollectorNumber() const override
|
||||
[[nodiscard]] QString getCardCollectorNumber() const override
|
||||
{
|
||||
return cardSetNumber;
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ public:
|
|||
* @return A CardRef with the card’s name and provider ID, suitable
|
||||
* for database lookups or comparison with other card sources.
|
||||
*/
|
||||
CardRef toCardRef() const
|
||||
[[nodiscard]] CardRef toCardRef() const
|
||||
{
|
||||
return {name, cardProviderId};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ public:
|
|||
|
||||
void clear();
|
||||
|
||||
bool canUndo() const
|
||||
[[nodiscard]] bool canUndo() const
|
||||
{
|
||||
return !undoStack.isEmpty();
|
||||
}
|
||||
|
||||
bool canRedo() const
|
||||
[[nodiscard]] bool canRedo() const
|
||||
{
|
||||
return !redoStack.isEmpty();
|
||||
}
|
||||
|
|
@ -37,11 +37,11 @@ public:
|
|||
|
||||
void redo(DeckList *deck);
|
||||
|
||||
QStack<DeckListMemento> getRedoStack() const
|
||||
[[nodiscard]] QStack<DeckListMemento> getRedoStack() const
|
||||
{
|
||||
return redoStack;
|
||||
}
|
||||
QStack<DeckListMemento> getUndoStack() const
|
||||
[[nodiscard]] QStack<DeckListMemento> getUndoStack() const
|
||||
{
|
||||
return undoStack;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
QString getMemento() const
|
||||
[[nodiscard]] QString getMemento() const
|
||||
{
|
||||
return memento;
|
||||
}
|
||||
QString getReason() const
|
||||
[[nodiscard]] QString getReason() const
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue