Skip to content

Commit

Permalink
Change some parms from pass-by-value to reference-to-const
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhsv committed Apr 29, 2023
1 parent 8d91a50 commit 1078a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/variables/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ class Global_DynamicElement : public Variable {
t->m_rules->m_secWebAppId.m_value);
}

static void storeOrUpdateFirst(Transaction *t, std::string var,
std::string value) {
static void storeOrUpdateFirst(Transaction *t, const std::string &var,
const std::string &value) {
t->m_collections.m_global_collection->storeOrUpdateFirst(
var, t->m_collections.m_global_collection_key,
t->m_rules->m_secWebAppId.m_value,
Expand Down
2 changes: 0 additions & 2 deletions test/cppcheck_suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ rethrowNoCurrentException:src/rule_with_actions.cc:127
ctunullpointer:src/rule_with_actions.cc:244
ctunullpointer:src/rule_with_operator.cc:135
ctunullpointer:src/rule_with_operator.cc:95
passedByValue:src/variables/global.h:109
passedByValue:src/variables/global.h:110
passedByValue:test/common/modsecurity_test.cc:49
passedByValue:test/common/modsecurity_test.cc:98
unreadVariable:src/rule_with_operator.cc:219
Expand Down

0 comments on commit 1078a7c

Please sign in to comment.