mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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:
@@ -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
@@ -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
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user