mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Avoid this unnecessary copy by using a "const" reference.
- Reported by Sonarcloud
This commit is contained in:
parent
d1e7e7b4f2
commit
b0497d9cb9
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user