Remove unused ApplyRule#m_TargetType

This commit is contained in:
Alexander A. Klimov 2022-10-18 12:40:09 +02:00
parent d468d7993c
commit c7d656716f
2 changed files with 4 additions and 11 deletions

View File

@ -9,18 +9,13 @@ using namespace icinga;
ApplyRule::RuleMap ApplyRule::m_Rules; ApplyRule::RuleMap ApplyRule::m_Rules;
ApplyRule::TypeMap ApplyRule::m_Types; ApplyRule::TypeMap ApplyRule::m_Types;
ApplyRule::ApplyRule(String targetType, String name, Expression::Ptr expression, ApplyRule::ApplyRule(String name, Expression::Ptr expression,
Expression::Ptr filter, String package, String fkvar, String fvvar, Expression::Ptr fterm, Expression::Ptr filter, String package, String fkvar, String fvvar, Expression::Ptr fterm,
bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope) bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope)
: m_TargetType(std::move(targetType)), m_Name(std::move(name)), m_Expression(std::move(expression)), m_Filter(std::move(filter)), m_Package(std::move(package)), m_FKVar(std::move(fkvar)), : m_Name(std::move(name)), m_Expression(std::move(expression)), m_Filter(std::move(filter)), m_Package(std::move(package)), m_FKVar(std::move(fkvar)),
m_FVVar(std::move(fvvar)), m_FTerm(std::move(fterm)), m_IgnoreOnError(ignoreOnError), m_DebugInfo(std::move(di)), m_Scope(std::move(scope)), m_HasMatches(false) m_FVVar(std::move(fvvar)), m_FTerm(std::move(fterm)), m_IgnoreOnError(ignoreOnError), m_DebugInfo(std::move(di)), m_Scope(std::move(scope)), m_HasMatches(false)
{ } { }
String ApplyRule::GetTargetType() const
{
return m_TargetType;
}
String ApplyRule::GetName() const String ApplyRule::GetName() const
{ {
return m_Name; return m_Name;
@ -86,7 +81,7 @@ void ApplyRule::AddRule(const String& sourceType, const String& targetType, cons
} }
m_Rules[Type::GetByName(sourceType).get()][Type::GetByName(*actualTargetType).get()].emplace_back(ApplyRule( m_Rules[Type::GetByName(sourceType).get()][Type::GetByName(*actualTargetType).get()].emplace_back(ApplyRule(
targetType, name, expression, filter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope name, expression, filter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope
)); ));
} }

View File

@ -21,7 +21,6 @@ public:
typedef std::map<String, std::vector<String> > TypeMap; typedef std::map<String, std::vector<String> > TypeMap;
typedef std::unordered_map<Type*, std::unordered_map<Type*, std::vector<ApplyRule>>> RuleMap; typedef std::unordered_map<Type*, std::unordered_map<Type*, std::vector<ApplyRule>>> RuleMap;
String GetTargetType() const;
String GetName() const; String GetName() const;
Expression::Ptr GetExpression() const; Expression::Ptr GetExpression() const;
Expression::Ptr GetFilter() const; Expression::Ptr GetFilter() const;
@ -50,7 +49,6 @@ public:
static void CheckMatches(bool silent); static void CheckMatches(bool silent);
private: private:
String m_TargetType;
String m_Name; String m_Name;
Expression::Ptr m_Expression; Expression::Ptr m_Expression;
Expression::Ptr m_Filter; Expression::Ptr m_Filter;
@ -66,7 +64,7 @@ private:
static TypeMap m_Types; static TypeMap m_Types;
static RuleMap m_Rules; static RuleMap m_Rules;
ApplyRule(String targetType, String name, Expression::Ptr expression, ApplyRule(String name, Expression::Ptr expression,
Expression::Ptr filter, String package, String fkvar, String fvvar, Expression::Ptr fterm, Expression::Ptr filter, String package, String fkvar, String fvvar, Expression::Ptr fterm,
bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope); bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope);
}; };