From 07aec070cac83390fa2a0a0cc7be16b4096d331b Mon Sep 17 00:00:00 2001 From: Eduardo Arias Date: Sun, 28 Apr 2024 18:12:49 -0300 Subject: [PATCH] Implement sonarcloud suggestions --- .../reading_logs_via_rule_message.h | 2 +- src/rule_with_operator.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h b/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h index 3fb6ef1ebe..9d80d9b1d2 100644 --- a/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h +++ b/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h @@ -124,7 +124,7 @@ class ReadingLogsViaRuleMessage { m_rules(rules) { } - int process() { + int process() const { pthread_t threads[NUM_THREADS]; int i; struct data_ms dms; diff --git a/src/rule_with_operator.cc b/src/rule_with_operator.cc index d308443a47..4669fa4392 100644 --- a/src/rule_with_operator.cc +++ b/src/rule_with_operator.cc @@ -133,7 +133,7 @@ bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string & void RuleWithOperator::getVariablesExceptions(Transaction *t, variables::Variables *exclusion, variables::Variables *addition) { - for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer + for (const auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer if (containsTag(*a.first.get(), t) == false) { continue; }