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

@ -94,7 +94,7 @@ public:
void clear();
/** @brief Returns the map of cards by name. */
const CardNameMap &getCardList() const
[[nodiscard]] const CardNameMap &getCardList() const
{
return cards;
}
@ -107,16 +107,16 @@ public:
CardSetPtr getSet(const QString &setName);
/** @brief Returns a list of all sets in the database. */
CardSetList getSetList() const;
[[nodiscard]] CardSetList getSetList() const;
/** @brief Returns the current load status. */
LoadStatus getLoadStatus() const
[[nodiscard]] LoadStatus getLoadStatus() const
{
return loadStatus;
}
/** @brief Returns the querier for performing card lookups. */
CardDatabaseQuerier *query() const
[[nodiscard]] CardDatabaseQuerier *query() const
{
return querier;
}

View file

@ -124,7 +124,7 @@ public:
* @param cardName Name of the card.
* @return The preferred ExactCard.
*/
ExactCard getPreferredCard(const QString &cardName) const;
[[nodiscard]] ExactCard getPreferredCard(const QString &cardName) const;
/**
* @brief Returns the preferred printing of a card based on user preferences and set priority.