mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Added const reported by cppcheck 2.14
This commit is contained in:
committed by
Eduardo Arias
parent
d053ec6de6
commit
bbef22b3b5
@@ -54,7 +54,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
|
||||
for (auto &x : files) {
|
||||
for (const auto &x : files) {
|
||||
std::cout << "Loading file: " << x << std::endl;
|
||||
if (modsecRules->loadFromUri(x.c_str()) < 0) {
|
||||
std::cout << "Not able to load the rules" << std::endl;
|
||||
@@ -96,8 +96,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (auto rwo = dynamic_cast<modsecurity::RuleWithOperator *>(z.get())) {
|
||||
std::string op = rwo->getOperatorName();
|
||||
if (const auto *rwo = dynamic_cast<modsecurity::RuleWithOperator *>(z.get())) {
|
||||
const auto op = rwo->getOperatorName();
|
||||
if (operators.count(op) > 0) {
|
||||
operators[op] = 1 + operators[op];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user