mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove PluginMetadata::Name() setter.
There's no reason for a PluginMetadata object's name to be changed after creation.
This commit is contained in:
@@ -220,10 +220,6 @@ namespace loot {
|
||||
return _locations;
|
||||
}
|
||||
|
||||
void PluginMetadata::Name(const std::string& n) {
|
||||
name = n;
|
||||
}
|
||||
|
||||
void PluginMetadata::Enabled(const bool e) {
|
||||
enabled = e;
|
||||
}
|
||||
@@ -415,4 +411,4 @@ namespace YAML {
|
||||
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace loot {
|
||||
std::set<PluginDirtyInfo> DirtyInfo() const;
|
||||
std::set<Location> Locations() const;
|
||||
|
||||
void Name(const std::string& name);
|
||||
void Enabled(const bool enabled);
|
||||
void SetPriorityExplicit(bool state);
|
||||
void Priority(const int priority);
|
||||
|
||||
@@ -370,13 +370,6 @@ TEST_F(PluginMetadata, NewMetadata) {
|
||||
EXPECT_FALSE(result.IsPriorityExplicit());
|
||||
}
|
||||
|
||||
TEST_F(PluginMetadata, Name) {
|
||||
loot::PluginMetadata pm;
|
||||
ASSERT_NE("Blank.esm", pm.Name());
|
||||
pm.Name("Blank.esm");
|
||||
EXPECT_EQ("Blank.esm", pm.Name());
|
||||
}
|
||||
|
||||
TEST_F(PluginMetadata, Enabled) {
|
||||
loot::PluginMetadata pm;
|
||||
ASSERT_TRUE(pm.Enabled());
|
||||
@@ -604,22 +597,22 @@ TEST_F(PluginMetadata, IsRegexPlugin) {
|
||||
loot::PluginMetadata pm;
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank.esm");
|
||||
pm = loot::PluginMetadata("Blank.esm");
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank[[:blank:]]- Different.esm");
|
||||
pm = loot::PluginMetadata("Blank[[:blank:]]- Different.esm");
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank\\.esm");
|
||||
pm = loot::PluginMetadata("Blank\\.esm");
|
||||
EXPECT_TRUE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank - (Different )*Master Dependent.esm");
|
||||
pm = loot::PluginMetadata("Blank - (Different )*Master Dependent.esm");
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank - (Different )?Master Dependent.esm");
|
||||
pm = loot::PluginMetadata("Blank - (Different )?Master Dependent.esm");
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
|
||||
pm.Name("Blank.es(p|m)");
|
||||
pm = loot::PluginMetadata("Blank.es(p|m)");
|
||||
EXPECT_FALSE(pm.IsRegexPlugin());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user