mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 19:16:40 +03:00
Cosmetics: address cppcheck warnings on src/actions
This commit is contained in:
@@ -53,7 +53,7 @@ enum AllowType : int {
|
||||
|
||||
class Allow : public Action {
|
||||
public:
|
||||
explicit Allow(std::string action)
|
||||
explicit Allow(const std::string &action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind),
|
||||
m_allowType(NoneAllowType) { }
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace disruptive {
|
||||
|
||||
class Deny : public Action {
|
||||
public:
|
||||
explicit Deny(std::string action) : Action(action) { }
|
||||
explicit Deny(const std::string &action) : Action(action) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction,
|
||||
std::shared_ptr<RuleMessage> rm) override;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace disruptive {
|
||||
|
||||
class Drop : public Action {
|
||||
public:
|
||||
explicit Drop(std::string action) : Action(action) { }
|
||||
explicit Drop(const std::string &action) : Action(action) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction,
|
||||
std::shared_ptr<RuleMessage> rm) override;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace disruptive {
|
||||
|
||||
class Pass : public Action {
|
||||
public:
|
||||
explicit Pass(std::string action) : Action(action) { }
|
||||
explicit Pass(const std::string &action) : Action(action) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction,
|
||||
std::shared_ptr<RuleMessage> rm) override;
|
||||
|
||||
@@ -38,10 +38,12 @@ class Redirect : public Action {
|
||||
public:
|
||||
explicit Redirect(const std::string &action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind),
|
||||
m_status(0) { }
|
||||
m_status(0),
|
||||
m_string(nullptr) { }
|
||||
|
||||
explicit Redirect(std::unique_ptr<RunTimeString> z)
|
||||
: Action("redirert", RunTimeOnlyIfMatchKind),
|
||||
m_status(0),
|
||||
m_string(std::move(z)) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction,
|
||||
|
||||
Reference in New Issue
Block a user