mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Change some parms to const reference (satisfies cppcheck)
This commit is contained in:
@@ -138,7 +138,7 @@ bool Operator::evaluate(Transaction *transaction, const std::string& a) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Operator *Operator::instantiate(std::string op, std::string param_str) {
|
||||
Operator *Operator::instantiate(const std::string& op, const std::string& param_str) {
|
||||
std::string op_ = utils::string::tolower(op);
|
||||
std::unique_ptr<RunTimeString> param(new RunTimeString());
|
||||
param->appendText(param_str);
|
||||
|
@@ -101,7 +101,8 @@ class Operator {
|
||||
}
|
||||
|
||||
virtual ~Operator() { }
|
||||
static Operator *instantiate(std::string opName, std::string param);
|
||||
static Operator *instantiate(const std::string& opName,
|
||||
const std::string& param);
|
||||
|
||||
virtual bool init(const std::string &arg, std::string *error) {
|
||||
return true;
|
||||
|
@@ -278,7 +278,7 @@ Transaction::~Transaction() {
|
||||
*
|
||||
*/
|
||||
#ifndef NO_LOGS
|
||||
void Transaction::debug(int level, std::string message) const {
|
||||
void Transaction::debug(int level, const std::string& message) const {
|
||||
if (m_rules == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ class Tx_DynamicElement : public Variable {
|
||||
}
|
||||
|
||||
static void storeOrUpdateFirst(Transaction *t, const std::string &var,
|
||||
std::string value) {
|
||||
const std::string &value) {
|
||||
t->m_collections.m_tx_collection->storeOrUpdateFirst(var, value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user