Remove some unused functions and variables

This commit is contained in:
Oliver Hamlet
2025-03-02 22:40:26 +00:00
parent d8997849d4
commit 3365a880e0
8 changed files with 0 additions and 58 deletions
-17
View File
@@ -45,23 +45,6 @@ std::vector<T> mergeVectors(std::vector<T> first,
return first;
}
// Returns the elements in first that are not in second. Although this is
// O(F * S), both input vectors are expected to be small (with tens of elements
// being an unusually large number).
template<typename T>
std::vector<T> diffVectors(const std::vector<T>& first,
const std::vector<T>& second) {
std::vector<T> result;
for (const auto& element : first) {
if (std::find(second.begin(), second.end(), element) == second.end()) {
result.push_back(element);
}
}
return result;
}
}
#endif
-13
View File
@@ -495,19 +495,6 @@ size_t Plugin::GetOverrideRecordCount() const {
return overrideRecordCount;
}
uint32_t Plugin::GetRecordAndGroupCount() const {
if (esPlugin == nullptr) {
return 0;
}
uint32_t recordAndGroupCount = 0;
const auto ret =
esp_plugin_record_and_group_count(esPlugin.get(), &recordAndGroupCount);
HandleEspluginError(ret, "get record and group count for \"{}\"", name_);
return recordAndGroupCount;
}
size_t Plugin::GetAssetCount() const {
return std::accumulate(
archiveAssets_.begin(),
-5
View File
@@ -44,7 +44,6 @@ class GameCache;
class PluginSortingInterface : public PluginInterface {
public:
virtual size_t GetOverrideRecordCount() const = 0;
virtual uint32_t GetRecordAndGroupCount() const = 0;
virtual size_t GetAssetCount() const = 0;
virtual bool DoAssetsOverlap(const PluginSortingInterface& plugin) const = 0;
@@ -82,7 +81,6 @@ public:
// Load ordering functions.
size_t GetOverrideRecordCount() const override;
uint32_t GetRecordAndGroupCount() const override;
size_t GetAssetCount() const;
bool DoAssetsOverlap(const PluginSortingInterface& plugin) const;
@@ -122,9 +120,6 @@ bool hasPluginFileExtension(std::string filename, GameType gameType);
bool equivalent(const std::filesystem::path& path1,
const std::filesystem::path& path2);
std::filesystem::path replaceExtension(std::filesystem::path path,
const std::string& newExtension);
}
#endif
-2
View File
@@ -553,8 +553,6 @@ bool FindPath(RawPluginGraph& graph,
reverseQueue.push(toVertex);
reverseVisited.insert(toVertex);
const auto logger = getLogger();
while (!forwardQueue.empty() && !reverseQueue.empty()) {
if (!forwardQueue.empty()) {
const auto v = forwardQueue.front();
-4
View File
@@ -89,10 +89,6 @@ bool PluginSortingData::IsBlueprintMaster() const {
plugin_->IsBlueprintPlugin();
}
bool PluginSortingData::LoadsArchive() const {
return plugin_ != nullptr && plugin_->LoadsArchive();
}
std::vector<std::string> PluginSortingData::GetMasters() const {
if (plugin_ == nullptr) {
return {};
-1
View File
@@ -49,7 +49,6 @@ public:
const std::string& GetName() const;
bool IsMaster() const;
bool IsBlueprintMaster() const;
bool LoadsArchive() const;
std::vector<std::string> GetMasters() const;
size_t GetOverrideRecordCount() const;
bool DoRecordsOverlap(const PluginSortingData& plugin) const;
-14
View File
@@ -170,7 +170,6 @@ public:
bool DoRecordsOverlap(const PluginInterface&) const override { return true; }
size_t GetOverrideRecordCount() const override { return 0; };
uint32_t GetRecordAndGroupCount() const override { return 0; };
size_t GetAssetCount() const override { return 0; };
bool DoAssetsOverlap(const PluginSortingInterface&) const override {
@@ -716,19 +715,6 @@ TEST_P(PluginTest,
EXPECT_TRUE(plugin2.DoRecordsOverlap(plugin1));
}
TEST_P(PluginTest, getRecordAndGroupCountShouldReturnTheHeaderFieldValue) {
Plugin plugin(
game_.GetType(), game_.GetCache(), game_.DataPath() / blankEsm, true);
if (GetParam() == GameType::tes3 || GetParam() == GameType::openmw) {
EXPECT_EQ(10u, plugin.GetRecordAndGroupCount());
} else if (GetParam() == GameType::tes4) {
EXPECT_EQ(14u, plugin.GetRecordAndGroupCount());
} else {
EXPECT_EQ(15u, plugin.GetRecordAndGroupCount());
}
}
TEST_P(PluginTest,
getAssetCountShouldReturnNumberOfFilesInArchivesLoadedByPlugin) {
const auto assetCount =
@@ -86,8 +86,6 @@ public:
return overrideRecordCount_;
}
uint32_t GetRecordAndGroupCount() const override { return uint32_t(); }
size_t GetAssetCount() const override { return assetCount_; };
bool DoAssetsOverlap(const PluginSortingInterface& plugin) const override {