Plugin class code tidy.

Just assign Form IDs, remove unused member function, and move
NumOverrideFormIDs() declaration to data accessors block.
This commit is contained in:
Oliver Hamlet
2015-07-15 10:17:08 +01:00
parent 16ac349e8b
commit debae8c4cd
2 changed files with 2 additions and 12 deletions
+1 -10
View File
@@ -102,7 +102,7 @@ namespace loot {
isMaster = loader.IsMaster();
masters = loader.Masters();
_isEmpty = loader.IsEmpty();
formIDs.insert(loader.FormIDs().begin(), loader.FormIDs().end());
formIDs = loader.FormIDs();
if (!headerOnly) {
BOOST_LOG_TRIVIAL(trace) << name << ": Caching CRC value.";
@@ -203,15 +203,6 @@ namespace loot {
return overlap;
}
std::set<FormID> Plugin::OverrideFormIDs() const {
set<FormID> fidSubset;
for (const auto &formID : formIDs) {
if (!boost::iequals(formID.Plugin(), name))
fidSubset.insert(formID);
}
return fidSubset;
}
std::vector<std::string> Plugin::Masters() const {
return masters;
}
+1 -2
View File
@@ -50,6 +50,7 @@ namespace loot {
bool IsEmpty() const;
std::string Version() const;
uint32_t Crc() const;
size_t NumOverrideFormIDs() const;
bool LoadsBSA(const Game& game) const;
bool IsValid(const Game& game) const;
@@ -61,9 +62,7 @@ namespace loot {
//Load ordering functions.
bool DoFormIDsOverlap(const Plugin& plugin) const;
size_t NumOverrideFormIDs() const;
std::set<FormID> OverlapFormIDs(const Plugin& plugin) const;
std::set<FormID> OverrideFormIDs() const;
//Validity checks.
bool CheckInstallValidity(const Game& game); //Checks that reqs and masters are all present, and that no incs are present. Returns true if the plugin is dirty.