mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Having a better organization for Variables::
This commit is contained in:
@@ -2011,7 +2011,7 @@ namespace yy {
|
||||
for (auto &i : *yystack_[0].value.as< std::unique_ptr<std::vector<std::unique_ptr<actions::Action> > > > ().get()) {
|
||||
a->push_back(i.release());
|
||||
}
|
||||
std::vector<Variable *> *v = new std::vector<Variable *>();
|
||||
Variables::Variables *v = new Variables::Variables();
|
||||
for (auto &i : *yystack_[2].value.as< std::unique_ptr<std::vector<std::unique_ptr<Variable> > > > ().get()) {
|
||||
v->push_back(i.release());
|
||||
}
|
||||
@@ -2035,7 +2035,7 @@ namespace yy {
|
||||
case 74:
|
||||
#line 1121 "seclang-parser.yy" // lalr1.cc:856
|
||||
{
|
||||
std::vector<Variable *> *v = new std::vector<Variable *>();
|
||||
Variables::Variables *v = new Variables::Variables();
|
||||
for (auto &i : *yystack_[1].value.as< std::unique_ptr<std::vector<std::unique_ptr<Variable> > > > ().get()) {
|
||||
v->push_back(i.release());
|
||||
}
|
||||
@@ -2896,7 +2896,7 @@ namespace yy {
|
||||
while (!originalList->empty()) {
|
||||
std::unique_ptr<Variable> var = std::move(originalList->back());
|
||||
originalList->pop_back();
|
||||
if (var->m_isExclusion) {
|
||||
if (dynamic_cast<VariableModificatorExclusion*>(var.get())) {
|
||||
exclusionVars->push_back(std::move(var));
|
||||
} else {
|
||||
newList->push_back(std::move(var));
|
||||
|
@@ -1099,7 +1099,7 @@ expression:
|
||||
for (auto &i : *$4.get()) {
|
||||
a->push_back(i.release());
|
||||
}
|
||||
std::vector<Variable *> *v = new std::vector<Variable *>();
|
||||
Variables::Variables *v = new Variables::Variables();
|
||||
for (auto &i : *$2.get()) {
|
||||
v->push_back(i.release());
|
||||
}
|
||||
@@ -1119,7 +1119,7 @@ expression:
|
||||
}
|
||||
| DIRECTIVE variables op
|
||||
{
|
||||
std::vector<Variable *> *v = new std::vector<Variable *>();
|
||||
Variables::Variables *v = new Variables::Variables();
|
||||
for (auto &i : *$2.get()) {
|
||||
v->push_back(i.release());
|
||||
}
|
||||
@@ -1732,7 +1732,7 @@ variables:
|
||||
while (!originalList->empty()) {
|
||||
std::unique_ptr<Variable> var = std::move(originalList->back());
|
||||
originalList->pop_back();
|
||||
if (var->m_isExclusion) {
|
||||
if (dynamic_cast<VariableModificatorExclusion*>(var.get())) {
|
||||
exclusionVars->push_back(std::move(var));
|
||||
} else {
|
||||
newList->push_back(std::move(var));
|
||||
|
Reference in New Issue
Block a user