diff --git a/src/api/helpers/collections.h b/src/api/helpers/collections.h index 9602ad5b..cea9d45c 100644 --- a/src/api/helpers/collections.h +++ b/src/api/helpers/collections.h @@ -45,23 +45,6 @@ std::vector mergeVectors(std::vector 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 -std::vector diffVectors(const std::vector& first, - const std::vector& second) { - std::vector result; - - for (const auto& element : first) { - if (std::find(second.begin(), second.end(), element) == second.end()) { - result.push_back(element); - } - } - - return result; -} } #endif diff --git a/src/api/plugin.cpp b/src/api/plugin.cpp index 86c11833..e4298ae9 100644 --- a/src/api/plugin.cpp +++ b/src/api/plugin.cpp @@ -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(), diff --git a/src/api/plugin.h b/src/api/plugin.h index 3c5bc877..5c741eec 100644 --- a/src/api/plugin.h +++ b/src/api/plugin.h @@ -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 diff --git a/src/api/sorting/plugin_graph.cpp b/src/api/sorting/plugin_graph.cpp index 6ff41e15..34688106 100644 --- a/src/api/sorting/plugin_graph.cpp +++ b/src/api/sorting/plugin_graph.cpp @@ -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(); diff --git a/src/api/sorting/plugin_sorting_data.cpp b/src/api/sorting/plugin_sorting_data.cpp index 253c8403..ec5b5f0c 100644 --- a/src/api/sorting/plugin_sorting_data.cpp +++ b/src/api/sorting/plugin_sorting_data.cpp @@ -89,10 +89,6 @@ bool PluginSortingData::IsBlueprintMaster() const { plugin_->IsBlueprintPlugin(); } -bool PluginSortingData::LoadsArchive() const { - return plugin_ != nullptr && plugin_->LoadsArchive(); -} - std::vector PluginSortingData::GetMasters() const { if (plugin_ == nullptr) { return {}; diff --git a/src/api/sorting/plugin_sorting_data.h b/src/api/sorting/plugin_sorting_data.h index 721d41cb..34e97439 100644 --- a/src/api/sorting/plugin_sorting_data.h +++ b/src/api/sorting/plugin_sorting_data.h @@ -49,7 +49,6 @@ public: const std::string& GetName() const; bool IsMaster() const; bool IsBlueprintMaster() const; - bool LoadsArchive() const; std::vector GetMasters() const; size_t GetOverrideRecordCount() const; bool DoRecordsOverlap(const PluginSortingData& plugin) const; diff --git a/src/tests/api/internals/plugin_test.h b/src/tests/api/internals/plugin_test.h index 28a1a848..f6ebf19d 100644 --- a/src/tests/api/internals/plugin_test.h +++ b/src/tests/api/internals/plugin_test.h @@ -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 = diff --git a/src/tests/api/internals/sorting/plugin_graph_test.h b/src/tests/api/internals/sorting/plugin_graph_test.h index 9a3e89e4..f045271c 100644 --- a/src/tests/api/internals/sorting/plugin_graph_test.h +++ b/src/tests/api/internals/sorting/plugin_graph_test.h @@ -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 {