mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -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
|
|
@ -9,10 +9,10 @@ class ICardDatabasePathProvider : public QObject
|
|||
public:
|
||||
virtual ~ICardDatabasePathProvider() = default;
|
||||
|
||||
virtual QString getCardDatabasePath() const = 0;
|
||||
virtual QString getCustomCardDatabasePath() const = 0;
|
||||
virtual QString getTokenDatabasePath() const = 0;
|
||||
virtual QString getSpoilerCardDatabasePath() const = 0;
|
||||
[[nodiscard]] virtual QString getCardDatabasePath() const = 0;
|
||||
[[nodiscard]] virtual QString getCustomCardDatabasePath() const = 0;
|
||||
[[nodiscard]] virtual QString getTokenDatabasePath() const = 0;
|
||||
[[nodiscard]] virtual QString getSpoilerCardDatabasePath() const = 0;
|
||||
|
||||
signals:
|
||||
void cardDatabasePathChanged();
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ class ICardPreferenceProvider
|
|||
{
|
||||
public:
|
||||
virtual ~ICardPreferenceProvider() = default;
|
||||
virtual QString getCardPreferenceOverride(const QString &cardName) const = 0;
|
||||
virtual bool getIncludeRebalancedCards() const = 0;
|
||||
[[nodiscard]] virtual QString getCardPreferenceOverride(const QString &cardName) const = 0;
|
||||
[[nodiscard]] virtual bool getIncludeRebalancedCards() const = 0;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_INTERFACE_CARD_PREFERENCE_PROVIDER_H
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@
|
|||
class NoopCardDatabasePathProvider : public ICardDatabasePathProvider
|
||||
{
|
||||
public:
|
||||
QString getCardDatabasePath() const override
|
||||
[[nodiscard]] QString getCardDatabasePath() const override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
QString getCustomCardDatabasePath() const override
|
||||
[[nodiscard]] QString getCustomCardDatabasePath() const override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
QString getTokenDatabasePath() const override
|
||||
[[nodiscard]] QString getTokenDatabasePath() const override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
QString getSpoilerCardDatabasePath() const override
|
||||
[[nodiscard]] QString getSpoilerCardDatabasePath() const override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
class NoopCardPreferenceProvider : public ICardPreferenceProvider
|
||||
{
|
||||
public:
|
||||
QString getCardPreferenceOverride(const QString &) const override
|
||||
[[nodiscard]] QString getCardPreferenceOverride(const QString &) const override
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
bool getIncludeRebalancedCards() const override
|
||||
[[nodiscard]] bool getIncludeRebalancedCards() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue