Construct string once, not unnecessarily N times

This commit is contained in:
Alexander A. Klimov 2022-10-17 15:54:02 +02:00
parent 91cbb856fe
commit ce1a122618
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}