From 5106307cc6d5e176e181256e4e853abb26b11898 Mon Sep 17 00:00:00 2001 From: Martin Vierula Date: Wed, 9 Feb 2022 13:02:06 -0800 Subject: [PATCH] Change one parm from pass-by-value to reference-to-const --- headers/modsecurity/rule_with_operator.h | 2 +- src/rule_with_operator.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/modsecurity/rule_with_operator.h b/headers/modsecurity/rule_with_operator.h index a8868bcb..e2fea4e6 100644 --- a/headers/modsecurity/rule_with_operator.h +++ b/headers/modsecurity/rule_with_operator.h @@ -56,7 +56,7 @@ class RuleWithOperator : public RuleWithActions { variables::Variables *eclusion, Transaction *trans); bool executeOperatorAt(Transaction *trasn, const std::string &key, - std::string value, std::shared_ptr rm); + const std::string &value, std::shared_ptr rm); static void updateMatchedVars(Transaction *trasn, const std::string &key, const std::string &value); diff --git a/src/rule_with_operator.cc b/src/rule_with_operator.cc index 8cb322e6..d218f14b 100644 --- a/src/rule_with_operator.cc +++ b/src/rule_with_operator.cc @@ -101,7 +101,7 @@ void RuleWithOperator::cleanMatchedVars(Transaction *trans) { bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string &key, - std::string value, std::shared_ptr ruleMessage) { + const std::string &value, std::shared_ptr ruleMessage) { #if MSC_EXEC_CLOCK_ENABLED clock_t begin = clock(); clock_t end;