From c7d656716f429df0c48211dfc150e1a7c416040a Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 18 Oct 2022 12:40:09 +0200 Subject: [PATCH] Remove unused ApplyRule#m_TargetType --- lib/config/applyrule.cpp | 11 +++-------- lib/config/applyrule.hpp | 4 +--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/config/applyrule.cpp b/lib/config/applyrule.cpp index 3c2e6f448..363dce90b 100644 --- a/lib/config/applyrule.cpp +++ b/lib/config/applyrule.cpp @@ -9,18 +9,13 @@ using namespace icinga; ApplyRule::RuleMap ApplyRule::m_Rules; 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, 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) { } -String ApplyRule::GetTargetType() const -{ - return m_TargetType; -} - String ApplyRule::GetName() const { 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( - targetType, name, expression, filter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope + name, expression, filter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope )); } diff --git a/lib/config/applyrule.hpp b/lib/config/applyrule.hpp index 63db2f691..10520bfbd 100644 --- a/lib/config/applyrule.hpp +++ b/lib/config/applyrule.hpp @@ -21,7 +21,6 @@ public: typedef std::map > TypeMap; typedef std::unordered_map>> RuleMap; - String GetTargetType() const; String GetName() const; Expression::Ptr GetExpression() const; Expression::Ptr GetFilter() const; @@ -50,7 +49,6 @@ public: static void CheckMatches(bool silent); private: - String m_TargetType; String m_Name; Expression::Ptr m_Expression; Expression::Ptr m_Filter; @@ -66,7 +64,7 @@ private: static TypeMap m_Types; 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, bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope); };