mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Avoid this unnecessary copy by using a "const" reference.
- Reported by Sonarcloud
This commit is contained in:
@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (const auto *rwo = dynamic_cast<modsecurity::RuleWithOperator *>(z.get())) {
|
if (const auto *rwo = dynamic_cast<modsecurity::RuleWithOperator *>(z.get())) {
|
||||||
const auto op = rwo->getOperatorName();
|
const auto &op = rwo->getOperatorName();
|
||||||
if (operators.count(op) > 0) {
|
if (operators.count(op) > 0) {
|
||||||
operators[op] = 1 + operators[op];
|
operators[op] = 1 + operators[op];
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user