mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Delete unused copy constructor & assignment operator in Rule, RuleMarker & Action
- Declare other unsupported copy constructor & assignment operators as deleted too (RuleWithActions, RuleUnconditional & RuleScript)
This commit is contained in:
@@ -13,15 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#ifndef HEADERS_MODSECURITY_RULE_H_
|
||||
#define HEADERS_MODSECURITY_RULE_H_
|
||||
|
||||
@@ -31,6 +22,12 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace modsecurity {
|
||||
namespace variables {
|
||||
class Variable;
|
||||
@@ -73,18 +70,9 @@ class Rule {
|
||||
m_phase(modsecurity::Phases::RequestHeadersPhase) {
|
||||
}
|
||||
|
||||
Rule(const Rule &other) :
|
||||
m_fileName(other.m_fileName),
|
||||
m_lineNumber(other.m_lineNumber),
|
||||
m_phase(other.m_phase)
|
||||
{ }
|
||||
Rule(const Rule &other) = delete;
|
||||
|
||||
Rule &operator=(const Rule& other) {
|
||||
m_fileName = other.m_fileName;
|
||||
m_lineNumber = other.m_lineNumber;
|
||||
m_phase = other.m_phase;
|
||||
return *this;
|
||||
}
|
||||
Rule &operator=(const Rule &other) = delete;
|
||||
|
||||
virtual ~Rule() {}
|
||||
|
||||
|
Reference in New Issue
Block a user