Skip to content

Commit a5a40a7

Browse files
author
Felipe Zimmerle
committed
Makes matchedvars inline
1 parent b58018e commit a5a40a7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

headers/modsecurity/rule.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class Rule {
9191
std::string value, std::shared_ptr<RuleMessage> rm);
9292
void executeActionsIndependentOfChainedRuleResult(Transaction *trasn,
9393
bool *b, std::shared_ptr<RuleMessage> ruleMessage);
94-
void updateMatchedVars(Transaction *trasn, std::string key,
95-
std::string value);
96-
void cleanMatchedVars(Transaction *trasn);
94+
inline void updateMatchedVars(Transaction *trasn, const std::string &key,
95+
const std::string &value);
96+
inline void cleanMatchedVars(Transaction *trasn);
9797

9898
std::vector<actions::Action *> getActionsByName(const std::string& name,
9999
Transaction *t);

src/rule.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ void Rule::cleanUpActions() {
241241
}
242242

243243

244-
void Rule::updateMatchedVars(Transaction *trans, std::string key,
245-
std::string value) {
244+
inline void Rule::updateMatchedVars(Transaction *trans, const std::string &key,
245+
const std::string &value) {
246246
#ifndef NO_LOGS
247247
trans->debug(9, "Matched vars updated.");
248248
#endif
@@ -254,7 +254,7 @@ void Rule::updateMatchedVars(Transaction *trans, std::string key,
254254
}
255255

256256

257-
void Rule::cleanMatchedVars(Transaction *trans) {
257+
inline void Rule::cleanMatchedVars(Transaction *trans) {
258258
#ifndef NO_LOGS
259259
trans->debug(9, "Matched vars cleaned.");
260260
#endif

0 commit comments

Comments
 (0)