mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Change some parms to const reference (satisfies cppcheck)
This commit is contained in:
parent
0be89cc15e
commit
606f5721c2
@ -399,7 +399,7 @@ class Transaction : public TransactionAnchoredVariables, public TransactionSecMa
|
||||
size_t getRequestBodyLength();
|
||||
|
||||
#ifndef NO_LOGS
|
||||
void debug(int, std::string) const;
|
||||
void debug(int, const std::string&) const;
|
||||
#endif
|
||||
void serverLog(std::shared_ptr<RuleMessage> rm);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -61,10 +61,7 @@ ctunullpointer:src/rule_with_operator.cc:135
|
||||
ctunullpointer:src/rule_with_operator.cc:95
|
||||
passedByValue:src/variables/global.h:109
|
||||
passedByValue:src/variables/global.h:110
|
||||
passedByValue:src/variables/tx.h:102
|
||||
passedByValue:src/operators/operator.cc:141
|
||||
passedByValue:src/parser/driver.cc:45
|
||||
passedByValue:src/transaction.cc:281
|
||||
passedByValue:src/utils/system.cc:154
|
||||
passedByValue:src/utils/system.cc:166
|
||||
passedByValue:test/common/modsecurity_test.cc:49
|
||||
|
Loading…
x
Reference in New Issue
Block a user