mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 18:54:23 +03:00
Cosmetics: address cppcheck warnings on src/variables
This commit is contained in:
@@ -34,7 +34,7 @@ namespace variables {
|
||||
|
||||
class Tx_DictElement : public Variable {
|
||||
public:
|
||||
explicit Tx_DictElement(std::string dictElement)
|
||||
explicit Tx_DictElement(const std::string &dictElement)
|
||||
: Variable("TX:" + dictElement),
|
||||
m_dictElement("TX:" + dictElement) { }
|
||||
|
||||
@@ -65,7 +65,7 @@ class Tx_NoDictElement : public Variable {
|
||||
|
||||
class Tx_DictElementRegexp : public VariableRegex {
|
||||
public:
|
||||
explicit Tx_DictElementRegexp(std::string dictElement)
|
||||
explicit Tx_DictElementRegexp(const std::string &dictElement)
|
||||
: VariableRegex("TX", dictElement),
|
||||
m_dictElement(dictElement) { }
|
||||
|
||||
@@ -94,11 +94,11 @@ class Tx_DynamicElement : public Variable {
|
||||
m_keyExclusion);
|
||||
}
|
||||
|
||||
void del(Transaction *t, std::string k) {
|
||||
static void del(Transaction *t, const std::string &k) {
|
||||
t->m_collections.m_tx_collection->del(k);
|
||||
}
|
||||
|
||||
void storeOrUpdateFirst(Transaction *t, std::string var,
|
||||
static void storeOrUpdateFirst(Transaction *t, const std::string &var,
|
||||
std::string value) {
|
||||
t->m_collections.m_tx_collection->storeOrUpdateFirst(var, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user