mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 19:47:46 -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
|
|
@ -46,7 +46,7 @@ public:
|
|||
}
|
||||
|
||||
/** Returns whether the request has finished */
|
||||
bool getFinished() const
|
||||
[[nodiscard]] bool getFinished() const
|
||||
{
|
||||
return finished->text() == "True";
|
||||
}
|
||||
|
|
@ -74,13 +74,13 @@ public:
|
|||
}
|
||||
|
||||
/** Returns the start time as a string */
|
||||
QString getStartTime() const
|
||||
[[nodiscard]] QString getStartTime() const
|
||||
{
|
||||
return startTime->text();
|
||||
}
|
||||
|
||||
/** Returns the URL of the request */
|
||||
QString getUrl() const
|
||||
[[nodiscard]] QString getUrl() const
|
||||
{
|
||||
return url->text();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ private:
|
|||
QSet<QString> currentlyLoading; ///< Deduplication: contains pixmapCacheKey currently being loaded
|
||||
|
||||
/** @brief Returns cached redirect URL for the given original URL, if available. */
|
||||
QUrl getCachedRedirect(const QUrl &originalUrl) const;
|
||||
[[nodiscard]] QUrl getCachedRedirect(const QUrl &originalUrl) const;
|
||||
|
||||
/** @brief Loads redirect cache from disk. */
|
||||
void loadRedirectCache();
|
||||
|
|
|
|||
|
|
@ -37,25 +37,25 @@ public:
|
|||
explicit CardPictureToLoad(const ExactCard &_card);
|
||||
|
||||
/** @return The card being loaded. */
|
||||
const ExactCard &getCard() const
|
||||
[[nodiscard]] const ExactCard &getCard() const
|
||||
{
|
||||
return card;
|
||||
}
|
||||
|
||||
/** @return The current URL being attempted. */
|
||||
QString getCurrentUrl() const
|
||||
[[nodiscard]] QString getCurrentUrl() const
|
||||
{
|
||||
return currentUrl;
|
||||
}
|
||||
|
||||
/** @return The current set being attempted. */
|
||||
CardSetPtr getCurrentSet() const
|
||||
[[nodiscard]] CardSetPtr getCurrentSet() const
|
||||
{
|
||||
return currentSet;
|
||||
}
|
||||
|
||||
/** @return The short name of the current set, or empty string if no set. */
|
||||
QString getSetName() const;
|
||||
[[nodiscard]] QString getSetName() const;
|
||||
|
||||
/**
|
||||
* @brief Transforms a URL template into a concrete URL for this card/set.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue