Add [[nodiscard]] specifiers as recommended by CLion.
This commit is contained in:
parent
41f5777379
commit
ceaa3ba6e4
9 changed files with 25 additions and 0 deletions
|
@ -45,7 +45,9 @@ class Writer {
|
|||
|
||||
auto position() -> std::int64_t;
|
||||
|
||||
[[nodiscard]]
|
||||
auto array() const -> Containers::ArrayView<const char>;
|
||||
[[nodiscard]]
|
||||
auto arrayPosition() const -> std::size_t;
|
||||
bool flushToFile();
|
||||
|
||||
|
|
|
@ -28,30 +28,39 @@ class Configuration {
|
|||
|
||||
~Configuration();
|
||||
|
||||
[[nodiscard]]
|
||||
bool valid() const;
|
||||
|
||||
[[nodiscard]]
|
||||
auto lastError() const -> Containers::StringView;
|
||||
|
||||
void save();
|
||||
|
||||
[[nodiscard]]
|
||||
auto swapInterval() const -> int;
|
||||
void setSwapInterval(int interval);
|
||||
|
||||
[[nodiscard]]
|
||||
auto fpsCap() const -> float;
|
||||
void setFpsCap(float cap);
|
||||
|
||||
[[nodiscard]]
|
||||
bool cheatMode() const;
|
||||
void setCheatMode(bool enabled);
|
||||
|
||||
[[nodiscard]]
|
||||
bool advancedMode() const;
|
||||
void setAdvancedMode(bool enabled);
|
||||
|
||||
[[nodiscard]]
|
||||
bool checkUpdatesOnStartup() const;
|
||||
void setCheckUpdatesOnStartup(bool mode);
|
||||
|
||||
[[nodiscard]]
|
||||
bool skipDisclaimer() const;
|
||||
void setSkipDisclaimer(bool mode);
|
||||
|
||||
[[nodiscard]]
|
||||
bool isRunningInWine() const;
|
||||
void setRunningInWine(bool wine);
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ class Mass {
|
|||
|
||||
auto state() -> State;
|
||||
|
||||
[[nodiscard]]
|
||||
bool dirty() const;
|
||||
void setDirty(bool dirty = true);
|
||||
|
||||
|
|
|
@ -34,7 +34,9 @@ class File {
|
|||
public:
|
||||
explicit File(Containers::String filepath);
|
||||
|
||||
[[nodiscard]]
|
||||
bool valid() const;
|
||||
[[nodiscard]]
|
||||
auto lastError() const -> Containers::StringView;
|
||||
|
||||
bool reloadData();
|
||||
|
|
|
@ -39,8 +39,10 @@ class BackupManager {
|
|||
|
||||
void refresh();
|
||||
|
||||
[[nodiscard]]
|
||||
auto backups() const -> Containers::ArrayView<const Backup>;
|
||||
|
||||
[[nodiscard]]
|
||||
auto vfs() const -> const Vfs::Directory<Backup>&;
|
||||
|
||||
bool create(const GameObjects::Profile& profile);
|
||||
|
|
|
@ -29,6 +29,7 @@ class ProfileManager {
|
|||
public:
|
||||
explicit ProfileManager();
|
||||
|
||||
[[nodiscard]]
|
||||
auto ready() const -> bool;
|
||||
auto lastError() -> Containers::StringView;
|
||||
|
||||
|
|
|
@ -33,7 +33,10 @@ class StagedMassManager {
|
|||
|
||||
auto lastError() -> Containers::StringView;
|
||||
|
||||
[[nodiscard]]
|
||||
auto stagedMasses() const -> Containers::ArrayView<const StagedMass>;
|
||||
|
||||
[[nodiscard]]
|
||||
auto at(Containers::StringView filename) const -> const StagedMass&;
|
||||
|
||||
void refresh();
|
||||
|
|
|
@ -44,6 +44,7 @@ class Directory {
|
|||
Directory(Directory<FileType>&& other) = default;
|
||||
Directory& operator=(Directory<FileType>&& other) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
auto name() const -> Containers::StringView {
|
||||
return _name;
|
||||
}
|
||||
|
|
|
@ -35,12 +35,16 @@ class UpdateChecker {
|
|||
|
||||
auto check() -> Result;
|
||||
|
||||
[[nodiscard]]
|
||||
auto error() const -> Containers::StringView;
|
||||
|
||||
[[nodiscard]]
|
||||
bool updateAvailable() const;
|
||||
|
||||
[[nodiscard]]
|
||||
auto version() const -> const Version&;
|
||||
|
||||
[[nodiscard]]
|
||||
auto downloadLink() const -> Containers::StringView;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue