Make const data members non-const

As recommended by C++ Core Guidelines C.12.

Plugin and Game are still non-copy-constructable or assignable due to
having members that are non-copy-constructable/assignable, but
consistency is still good.
This commit is contained in:
Oliver Hamlet
2022-02-19 13:55:03 +00:00
parent 0907f91b6f
commit 14479b2289
4 changed files with 5 additions and 5 deletions
@@ -54,7 +54,7 @@ public:
LOOT_API std::vector<Vertex> GetCycle();
private:
const std::vector<Vertex> cycle_;
std::vector<Vertex> cycle_;
};
}
@@ -50,7 +50,7 @@ public:
LOOT_API std::string GetGroupName() { return groupName_; }
private:
const std::string groupName_;
std::string groupName_;
};
}
+2 -2
View File
@@ -81,8 +81,8 @@ public:
private:
void CacheArchives();
const GameType type_;
const std::filesystem::path gamePath_;
GameType type_;
std::filesystem::path gamePath_;
GameCache cache_;
LoadOrderHandler loadOrderHandler_;
+1 -1
View File
@@ -84,7 +84,7 @@ private:
const std::filesystem::path& pluginPath);
static unsigned int GetEspluginGameId(GameType gameType);
const std::string name_;
std::string name_;
std::unique_ptr<::Plugin, decltype(&esp_plugin_free)> esPlugin;
bool isEmpty_; // Does the plugin contain any records other than the TES4
// header?