mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Cosmetics: address cppcheck warnings on src/variables
This commit is contained in:
@@ -34,7 +34,7 @@ namespace variables {
|
||||
|
||||
class Ip_DictElement : public Variable {
|
||||
public:
|
||||
explicit Ip_DictElement(std::string dictElement)
|
||||
explicit Ip_DictElement(const std::string &dictElement)
|
||||
: Variable("IP:" + dictElement),
|
||||
m_dictElement("IP:" + dictElement) { }
|
||||
|
||||
@@ -67,7 +67,7 @@ class Ip_NoDictElement : public Variable {
|
||||
|
||||
class Ip_DictElementRegexp : public VariableRegex {
|
||||
public:
|
||||
explicit Ip_DictElementRegexp(std::string dictElement)
|
||||
explicit Ip_DictElementRegexp(const std::string &dictElement)
|
||||
: VariableRegex("IP", dictElement),
|
||||
m_dictElement(dictElement) { }
|
||||
|
||||
@@ -99,14 +99,14 @@ class Ip_DynamicElement : public Variable {
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
}
|
||||
|
||||
void del(Transaction *t, std::string k) {
|
||||
static void del(Transaction *t, const std::string &k) {
|
||||
t->m_collections.m_ip_collection->del(k,
|
||||
t->m_collections.m_ip_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value);
|
||||
}
|
||||
|
||||
void storeOrUpdateFirst(Transaction *t, std::string var,
|
||||
std::string value) {
|
||||
static void storeOrUpdateFirst(Transaction *t, const std::string &var,
|
||||
const std::string &value) {
|
||||
t->m_collections.m_ip_collection->storeOrUpdateFirst(
|
||||
var, t->m_collections.m_ip_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value,
|
||||
|
Reference in New Issue
Block a user