Skip to content

Commit 5106307

Browse files
committed
Change one parm from pass-by-value to reference-to-const
1 parent 378e31c commit 5106307

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

headers/modsecurity/rule_with_operator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class RuleWithOperator : public RuleWithActions {
5656
variables::Variables *eclusion, Transaction *trans);
5757

5858
bool executeOperatorAt(Transaction *trasn, const std::string &key,
59-
std::string value, std::shared_ptr<RuleMessage> rm);
59+
const std::string &value, std::shared_ptr<RuleMessage> rm);
6060

6161
static void updateMatchedVars(Transaction *trasn, const std::string &key,
6262
const std::string &value);

src/rule_with_operator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void RuleWithOperator::cleanMatchedVars(Transaction *trans) {
101101

102102

103103
bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string &key,
104-
std::string value, std::shared_ptr<RuleMessage> ruleMessage) {
104+
const std::string &value, std::shared_ptr<RuleMessage> ruleMessage) {
105105
#if MSC_EXEC_CLOCK_ENABLED
106106
clock_t begin = clock();
107107
clock_t end;

0 commit comments

Comments
 (0)