@@ -209,7 +209,7 @@ void RuleWithActions::executeActionsIndependentOfChainedRuleResult(Transaction *
209209 a->evaluate (this , trans);
210210 }
211211
212- for (auto & b :
212+ for (const auto & b :
213213 trans->m_rules ->m_exceptions .m_action_pre_update_target_by_id ) {
214214 if (m_ruleId != b.first ) {
215215 continue ;
@@ -262,7 +262,7 @@ void RuleWithActions::executeActionsAfterFullMatch(Transaction *trans,
262262 a->evaluate (this , trans, ruleMessage);
263263 }
264264
265- for (auto & b :
265+ for (const auto & b :
266266 trans->m_rules ->m_exceptions .m_action_pos_update_target_by_id ) {
267267 if (m_ruleId != b.first ) {
268268 continue ;
@@ -373,7 +373,7 @@ void RuleWithActions::executeTransformations(
373373 // Notice that first we make sure that won't be a t:none
374374 // on the target rule.
375375 if (none == 0 ) {
376- for (auto & a : trans->m_rules ->m_defaultActions [getPhase ()]) {
376+ for (const auto & a : trans->m_rules ->m_defaultActions [getPhase ()]) {
377377 if (a->action_kind \
378378 != actions::Action::Kind::RunTimeBeforeMatchAttemptKind) {
379379 continue ;
@@ -400,7 +400,7 @@ void RuleWithActions::executeTransformations(
400400
401401 // FIXME: It can't be something different from transformation. Sort this
402402 // on rules compile time.
403- for (auto & b :
403+ for (const auto & b :
404404 trans->m_rules ->m_exceptions .m_action_pre_update_target_by_id ) {
405405 if (m_ruleId != b.first ) {
406406 continue ;
@@ -412,7 +412,7 @@ void RuleWithActions::executeTransformations(
412412 }
413413 }
414414
415- for (auto & b :
415+ for (const auto & b :
416416 trans->m_rules ->m_exceptions .m_action_pre_update_target_by_id ) {
417417 if (m_ruleId != b.first ) {
418418 continue ;
@@ -442,7 +442,7 @@ void RuleWithActions::executeTransformations(
442442
443443
444444bool RuleWithActions::containsTag (const std::string& name, Transaction *t) {
445- for (auto &tag : m_actionsTag) {
445+ for (const auto &tag : m_actionsTag) {
446446 if (tag != NULL && tag->getName (t) == name) {
447447 return true ;
448448 }
@@ -459,17 +459,17 @@ bool RuleWithActions::containsMsg(const std::string& name, Transaction *t) {
459459std::vector<actions::Action *> RuleWithActions::getActionsByName (const std::string& name,
460460 const Transaction *trans) {
461461 std::vector<actions::Action *> ret;
462- for (auto &z : m_actionsRuntimePos) {
462+ for (const auto &z : m_actionsRuntimePos) {
463463 if (*z->m_name .get () == name) {
464464 ret.push_back (z);
465465 }
466466 }
467- for (auto & z : m_transformations) {
467+ for (const auto & z : m_transformations) {
468468 if (*z->m_name .get () == name) {
469469 ret.push_back (z);
470470 }
471471 }
472- for (auto & b :
472+ for (const auto & b :
473473 trans->m_rules ->m_exceptions .m_action_pre_update_target_by_id ) {
474474 if (m_ruleId != b.first ) {
475475 continue ;
@@ -479,7 +479,7 @@ std::vector<actions::Action *> RuleWithActions::getActionsByName(const std::stri
479479 ret.push_back (z);
480480 }
481481 }
482- for (auto & b :
482+ for (const auto & b :
483483 trans->m_rules ->m_exceptions .m_action_pos_update_target_by_id ) {
484484 if (m_ruleId != b.first ) {
485485 continue ;
0 commit comments