mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Refactoring on the Rule class
This commit is contained in:
@@ -605,6 +605,16 @@ class VariableRegex : public Variable {
|
||||
|
||||
class Variables : public std::vector<Variable *> {
|
||||
public:
|
||||
bool contains(Variable *v) {
|
||||
return std::find_if(begin(), end(),
|
||||
[v](Variable *m) -> bool { return *v == *m; }) != end();
|
||||
};
|
||||
bool contains(const std::string &v) {
|
||||
return std::find_if(begin(), end(),
|
||||
[v](Variable *m) -> bool {
|
||||
return v == *m->m_fullName.get();
|
||||
}) != end();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user