const-ify some references (satisfy cppcheck)

This commit is contained in:
Martin Vierula
2023-10-27 06:20:01 -07:00
parent b9836bcaa4
commit 36adc58ea3
11 changed files with 14 additions and 14 deletions

View File

@@ -162,7 +162,7 @@ int RulesSet::evaluate(int phase, Transaction *t) {
}
bool remove_rule = false;
if (ruleWithActions && m_exceptions.m_remove_rule_by_msg.empty() == false) {
for (auto &z : m_exceptions.m_remove_rule_by_msg) {
for (const auto &z : m_exceptions.m_remove_rule_by_msg) {
if (ruleWithActions->containsMsg(z, t) == true) {
ms_dbg_a(t, 9, "Skipped rule id '" \
+ ruleWithActions->getReference() \
@@ -177,7 +177,7 @@ int RulesSet::evaluate(int phase, Transaction *t) {
}
if (ruleWithActions && m_exceptions.m_remove_rule_by_tag.empty() == false) {
for (auto &z : m_exceptions.m_remove_rule_by_tag) {
for (const auto &z : m_exceptions.m_remove_rule_by_tag) {
if (ruleWithActions->containsTag(z, t) == true) {
ms_dbg_a(t, 9, "Skipped rule id '" \
+ ruleWithActions->getReference() \
@@ -193,7 +193,7 @@ int RulesSet::evaluate(int phase, Transaction *t) {
if (ruleWithActions) {
for (auto &z : t->m_ruleRemoveByTag) {
for (const auto &z : t->m_ruleRemoveByTag) {
if (ruleWithActions->containsTag(z, t) == true) {
ms_dbg_a(t, 9, "Skipped rule id '" \
+ ruleWithActions->getReference() \