clang-tidy: modernize-use-nodiscard
This commit is contained in:
parent
e50bb2bd80
commit
7d897c6081
|
@ -80,7 +80,7 @@ public:
|
|||
void DoRemoveWeightStageSub();
|
||||
void DoClickCheckboxID(const bool);
|
||||
|
||||
std::vector<Starpounds::WeightStage> GetWeightStages() const;
|
||||
[[nodiscard]] std::vector<Starpounds::WeightStage> GetWeightStages() const;
|
||||
void ClearWeightStages();
|
||||
|
||||
virtual size_t CheckForErrors();
|
||||
|
|
|
@ -47,9 +47,11 @@ public:
|
|||
Grid(const std::vector<std::vector<std::optional<std::string>>> &,
|
||||
const std::tuple<uint32_t, uint32_t> = {129, 129},
|
||||
const std::tuple<uint32_t, uint32_t> = {9, 6});
|
||||
std::tuple<uint32_t, uint32_t> GetSize() const;
|
||||
std::tuple<uint32_t, uint32_t> GetDimensions() const;
|
||||
std::vector<std::vector<std::optional<std::string>>> GetNames() const;
|
||||
|
||||
[[nodiscard]] std::tuple<uint32_t, uint32_t> GetSize() const;
|
||||
[[nodiscard]] std::tuple<uint32_t, uint32_t> GetDimensions() const;
|
||||
[[nodiscard]] std::vector<std::vector<std::optional<std::string>>>
|
||||
GetNames() const;
|
||||
|
||||
void SetSize(const std::tuple<uint32_t, uint32_t>);
|
||||
void SetDimensions(const std::tuple<uint32_t, uint32_t>);
|
||||
|
@ -65,8 +67,11 @@ class Frames {
|
|||
public:
|
||||
Frames() = delete;
|
||||
Frames(const std::unordered_map<std::string, std::string> &, const Grid &);
|
||||
std::unordered_map<std::string, std::string> GetAliases() const;
|
||||
Grid GetGrid() const;
|
||||
|
||||
[[nodiscard]] std::unordered_map<std::string, std::string>
|
||||
GetAliases() const;
|
||||
|
||||
[[nodiscard]] Grid GetGrid() const;
|
||||
|
||||
void SetAliases(const std::unordered_map<std::string, std::string> &);
|
||||
void SetGrid(const Grid &);
|
||||
|
|
|
@ -58,9 +58,9 @@ public:
|
|||
Frames(const std::filesystem::path &, const std::filesystem::path &,
|
||||
const std::filesystem::path &);
|
||||
|
||||
std::filesystem::path GetBody() const;
|
||||
std::filesystem::path GetBackSleeve() const;
|
||||
std::filesystem::path GetFrontSleeve() const;
|
||||
[[nodiscard]] std::filesystem::path GetBody() const;
|
||||
[[nodiscard]] std::filesystem::path GetBackSleeve() const;
|
||||
[[nodiscard]] std::filesystem::path GetFrontSleeve() const;
|
||||
|
||||
void SetBody(const std::filesystem::path &);
|
||||
void SetBackSleeve(const std::filesystem::path &);
|
||||
|
@ -80,17 +80,17 @@ public:
|
|||
const std::string &, const std::string &, const Frames &,
|
||||
const Frames &);
|
||||
|
||||
std::string GetItemName() const;
|
||||
uint32_t GetPrice() const;
|
||||
std::filesystem::path GetInventoryIcon() const;
|
||||
uint16_t GetMaxStack() const;
|
||||
Rarity GetRarity() const;
|
||||
Category GetCategory() const;
|
||||
std::string GetDescription() const;
|
||||
std::string GetShortDescription() const;
|
||||
TooltipKind GetTooltipKind() const;
|
||||
Frames GetMaleFrames() const;
|
||||
Frames GetFemaleFrames() const;
|
||||
[[nodiscard]] std::string GetItemName() const;
|
||||
[[nodiscard]] uint32_t GetPrice() const;
|
||||
[[nodiscard]] std::filesystem::path GetInventoryIcon() const;
|
||||
[[nodiscard]] uint16_t GetMaxStack() const;
|
||||
[[nodiscard]] Rarity GetRarity() const;
|
||||
[[nodiscard]] Category GetCategory() const;
|
||||
[[nodiscard]] std::string GetDescription() const;
|
||||
[[nodiscard]] std::string GetShortDescription() const;
|
||||
[[nodiscard]] TooltipKind GetTooltipKind() const;
|
||||
[[nodiscard]] Frames GetMaleFrames() const;
|
||||
[[nodiscard]] Frames GetFemaleFrames() const;
|
||||
|
||||
void SetItemName(const std::string &);
|
||||
void SetPrice(const uint32_t);
|
||||
|
|
|
@ -48,17 +48,17 @@ public:
|
|||
const std::string & = "http://git.vern.cc/prisixia/speciesgen",
|
||||
const std::vector<std::string> & = {"starpounds"});
|
||||
|
||||
std::string GetName() const;
|
||||
std::string GetFriendlyName() const;
|
||||
std::string GetDescription() const;
|
||||
std::string GetAuthor() const;
|
||||
std::string GetVersion() const;
|
||||
std::string GetLink() const;
|
||||
std::string GetSteamContentID() const;
|
||||
std::string GetTags() const;
|
||||
std::vector<std::string> GetIncludes() const;
|
||||
std::vector<std::string> GetRequires() const;
|
||||
uint32_t GetPriority() const;
|
||||
[[nodiscard]] std::string GetName() const;
|
||||
[[nodiscard]] std::string GetFriendlyName() const;
|
||||
[[nodiscard]] std::string GetDescription() const;
|
||||
[[nodiscard]] std::string GetAuthor() const;
|
||||
[[nodiscard]] std::string GetVersion() const;
|
||||
[[nodiscard]] std::string GetLink() const;
|
||||
[[nodiscard]] std::string GetSteamContentID() const;
|
||||
[[nodiscard]] std::string GetTags() const;
|
||||
[[nodiscard]] std::vector<std::string> GetIncludes() const;
|
||||
[[nodiscard]] std::vector<std::string> GetRequires() const;
|
||||
[[nodiscard]] uint32_t GetPriority() const;
|
||||
|
||||
void SetName(const std::string &);
|
||||
void SetFriendlyName(const std::string &);
|
||||
|
|
|
@ -55,9 +55,10 @@ public:
|
|||
Patch(std::filesystem::path path, Value value,
|
||||
Operation op = Operation::Add)
|
||||
: m_op(op), m_path(std::move(path)), m_value(value) {}
|
||||
Operation GetOperation() const { return m_op; }
|
||||
std::filesystem::path GetPath() const { return m_path; }
|
||||
Value GetValue() const { return m_value; }
|
||||
|
||||
[[nodiscard]] Operation GetOperation() const { return m_op; }
|
||||
[[nodiscard]] std::filesystem::path GetPath() const { return m_path; }
|
||||
[[nodiscard]] Value GetValue() const { return m_value; }
|
||||
|
||||
void SetOperation(const Operation op) { m_op = op; }
|
||||
void SetPath(const std::filesystem::path &path) { m_path = path; }
|
||||
|
|
|
@ -42,9 +42,9 @@ public:
|
|||
SpeciesConfig(const std::string &, const bool = false);
|
||||
SpeciesConfig(const std::string &, const std::string &, const bool = false);
|
||||
|
||||
bool GetFullbright() const;
|
||||
std::string GetOverride() const;
|
||||
std::string GetOverrideDirectives() const;
|
||||
[[nodiscard]] bool GetFullbright() const;
|
||||
[[nodiscard]] std::string GetOverride() const;
|
||||
[[nodiscard]] std::string GetOverrideDirectives() const;
|
||||
|
||||
void SetFullbright(const bool);
|
||||
void SetOverride(const std::string &);
|
||||
|
|
|
@ -47,10 +47,11 @@ public:
|
|||
const std::string &, const Types::Chests);
|
||||
WeightStageSub(const std::string &);
|
||||
WeightStageSub(const Types::Subs, const std::string &);
|
||||
std::string GetName() const;
|
||||
std::string GetFriendlyName() const;
|
||||
std::string GetChestDescription() const;
|
||||
Types::Chests GetChestType() const;
|
||||
|
||||
[[nodiscard]] std::string GetName() const;
|
||||
[[nodiscard]] std::string GetFriendlyName() const;
|
||||
[[nodiscard]] std::string GetChestDescription() const;
|
||||
[[nodiscard]] Types::Chests GetChestType() const;
|
||||
|
||||
void SetName(const std::string &);
|
||||
void SetFriendlyName(const std::string &);
|
||||
|
@ -73,11 +74,12 @@ public:
|
|||
const std::vector<WeightStageSub> & = {});
|
||||
WeightStage(const std::string &, const bool, const bool,
|
||||
const std::vector<WeightStageSub> & = {});
|
||||
std::string GetLegDescription() const;
|
||||
Types::Legs GetLegType() const;
|
||||
bool HasFrames() const;
|
||||
bool HasID() const;
|
||||
std::vector<WeightStageSub> GetSubs() const;
|
||||
|
||||
[[nodiscard]] std::string GetLegDescription() const;
|
||||
[[nodiscard]] Types::Legs GetLegType() const;
|
||||
[[nodiscard]] bool HasFrames() const;
|
||||
[[nodiscard]] bool HasID() const;
|
||||
[[nodiscard]] std::vector<WeightStageSub> GetSubs() const;
|
||||
|
||||
void SetLegDescription(const std::string &);
|
||||
void SetLegType(const Types::Legs);
|
||||
|
|
Loading…
Reference in New Issue