From ce1a12261887eaeae8e3b43a1c5edc3b22db9c9a Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 17 Oct 2022 15:54:02 +0200 Subject: [PATCH] Construct string once, not unnecessarily N times --- lib/icinga/service-apply.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icinga/service-apply.cpp b/lib/icinga/service-apply.cpp index 89de8d76778..760c9461701 100644 --- a/lib/icinga/service-apply.cpp +++ b/lib/icinga/service-apply.cpp @@ -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(); }