mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
Construct string once, not unnecessarily N times
This commit is contained in:
parent
1b2875dc45
commit
17c652d8dd
@ -121,9 +121,9 @@ bool Service::EvaluateApplyRule(const Host::Ptr& host, const ApplyRule& rule)
|
||||
|
||||
void Service::EvaluateApplyRules(const Host::Ptr& host)
|
||||
{
|
||||
for (ApplyRule& rule : ApplyRule::GetRules("Service")) {
|
||||
CONTEXT("Evaluating 'apply' rules for host '" + host->GetName() + "'");
|
||||
CONTEXT("Evaluating 'apply' rules for host '" + host->GetName() + "'");
|
||||
|
||||
for (ApplyRule& rule : ApplyRule::GetRules("Service")) {
|
||||
if (EvaluateApplyRule(host, rule))
|
||||
rule.AddMatch();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user