Skip to content

Commit 1f419bb

Browse files
committed
Implement sonarcloud suggestions
1 parent 9f5dc20 commit 1f419bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class ReadingLogsViaRuleMessage {
124124
m_rules(rules)
125125
{ }
126126

127-
int process() {
127+
int process() const {
128128
pthread_t threads[NUM_THREADS];
129129
int i;
130130
struct data_ms dms;

src/rule_with_operator.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string &
133133

134134
void RuleWithOperator::getVariablesExceptions(Transaction *t,
135135
variables::Variables *exclusion, variables::Variables *addition) {
136-
for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer
136+
for (const auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { // cppcheck-suppress ctunullpointer
137137
if (containsTag(*a.first.get(), t) == false) {
138138
continue;
139139
}
@@ -147,7 +147,7 @@ void RuleWithOperator::getVariablesExceptions(Transaction *t,
147147
}
148148
}
149149

150-
for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_msg) {
150+
for (const auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_msg) {
151151
if (containsMsg(*a.first.get(), t) == false) {
152152
continue;
153153
}
@@ -161,7 +161,7 @@ void RuleWithOperator::getVariablesExceptions(Transaction *t,
161161
}
162162
}
163163

164-
for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_id) {
164+
for (const auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_id) {
165165
if (m_ruleId != a.first) {
166166
continue;
167167
}

0 commit comments

Comments
 (0)