Skip to content

Commit b0497d9

Browse files
committed
Avoid this unnecessary copy by using a "const" reference.
- Reported by Sonarcloud
1 parent d1e7e7b commit b0497d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/optimization/optimization.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
9797
}
9898

9999
if (const auto *rwo = dynamic_cast<modsecurity::RuleWithOperator *>(z.get())) {
100-
const auto op = rwo->getOperatorName();
100+
const auto &op = rwo->getOperatorName();
101101
if (operators.count(op) > 0) {
102102
operators[op] = 1 + operators[op];
103103
} else {

0 commit comments

Comments
 (0)