Skip to content

Commit 1078a7c

Browse files
committed
Change some parms from pass-by-value to reference-to-const
1 parent 8d91a50 commit 1078a7c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/variables/global.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class Global_DynamicElement : public Variable {
106106
t->m_rules->m_secWebAppId.m_value);
107107
}
108108

109-
static void storeOrUpdateFirst(Transaction *t, std::string var,
110-
std::string value) {
109+
static void storeOrUpdateFirst(Transaction *t, const std::string &var,
110+
const std::string &value) {
111111
t->m_collections.m_global_collection->storeOrUpdateFirst(
112112
var, t->m_collections.m_global_collection_key,
113113
t->m_rules->m_secWebAppId.m_value,

test/cppcheck_suppressions.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ rethrowNoCurrentException:src/rule_with_actions.cc:127
5858
ctunullpointer:src/rule_with_actions.cc:244
5959
ctunullpointer:src/rule_with_operator.cc:135
6060
ctunullpointer:src/rule_with_operator.cc:95
61-
passedByValue:src/variables/global.h:109
62-
passedByValue:src/variables/global.h:110
6361
passedByValue:test/common/modsecurity_test.cc:49
6462
passedByValue:test/common/modsecurity_test.cc:98
6563
unreadVariable:src/rule_with_operator.cc:219

0 commit comments

Comments
 (0)