mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove unnecessary Plugin::operator< overload
This commit is contained in:
@@ -261,10 +261,6 @@ uintmax_t Plugin::GetFileSize(std::filesystem::path pluginPath) {
|
||||
return std::filesystem::file_size(pluginPath);
|
||||
}
|
||||
|
||||
bool Plugin::operator<(const Plugin& rhs) const {
|
||||
return CompareFilenames(name_, rhs.name_) < 0;
|
||||
}
|
||||
|
||||
void Plugin::Load(const std::filesystem::path& path,
|
||||
GameType gameType,
|
||||
bool headerOnly) {
|
||||
|
||||
@@ -73,8 +73,6 @@ public:
|
||||
const std::filesystem::path& pluginPath);
|
||||
static uintmax_t GetFileSize(std::filesystem::path pluginPath);
|
||||
|
||||
bool operator<(const Plugin& rhs) const;
|
||||
|
||||
private:
|
||||
void Load(const std::filesystem::path& path,
|
||||
GameType gameType,
|
||||
|
||||
@@ -200,7 +200,7 @@ void PluginGraph::AddPluginVertices(Game& game,
|
||||
return true;
|
||||
}
|
||||
|
||||
return *lhs < *rhs;
|
||||
return lhs->GetName() < rhs->GetName();
|
||||
});
|
||||
|
||||
for (const auto& plugin : loadedPlugins) {
|
||||
|
||||
@@ -437,27 +437,6 @@ TEST_P(PluginTest, getFileSizeShouldReturnCorrectValueForAGhostedPlugin) {
|
||||
Plugin::GetFileSize(game_.DataPath() / blankMasterDependentEsm));
|
||||
}
|
||||
|
||||
TEST_P(PluginTest,
|
||||
lessThanOperatorShouldUseCaseInsensitiveLexicographicalNameComparison) {
|
||||
Plugin plugin1(
|
||||
game_.Type(), game_.GetCache(), game_.DataPath() / blankEsp, true);
|
||||
Plugin plugin2(game_.Type(),
|
||||
game_.GetCache(),
|
||||
game_.DataPath() / lowercaseBlankEsp,
|
||||
true);
|
||||
|
||||
EXPECT_FALSE(plugin1 < plugin2);
|
||||
EXPECT_FALSE(plugin2 < plugin1);
|
||||
|
||||
Plugin plugin3 =
|
||||
Plugin(game_.Type(), game_.GetCache(), game_.DataPath() / blankEsm, true);
|
||||
Plugin plugin4 =
|
||||
Plugin(game_.Type(), game_.GetCache(), game_.DataPath() / blankEsp, true);
|
||||
|
||||
EXPECT_TRUE(plugin3 < plugin4);
|
||||
EXPECT_FALSE(plugin4 < plugin3);
|
||||
}
|
||||
|
||||
TEST_P(PluginTest,
|
||||
doFormIDsOverlapShouldReturnFalseIfTheArgumentIsNotAPluginObject) {
|
||||
Plugin plugin1(
|
||||
|
||||
Reference in New Issue
Block a user