mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 01:51:52 +03:00
const-ify some references (satisfy cppcheck)
This commit is contained in:
@@ -69,7 +69,7 @@ void RemoteUser::evaluate(Transaction *transaction,
|
||||
var = new VariableValue(&l2->at(0)->getKeyWithCollection(),
|
||||
&transaction->m_variableRemoteUser);
|
||||
|
||||
for (auto &i : l2->at(0)->getOrigin()) {
|
||||
for (const auto &i : l2->at(0)->getOrigin()) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
origin->m_offset = i->m_offset;
|
||||
origin->m_length = i->m_length;
|
||||
|
||||
@@ -83,7 +83,7 @@ std::string operator+(const std::string &a, Variable *v) {
|
||||
|
||||
std::string operator+(const std::string &a, Variables *v) {
|
||||
std::string test;
|
||||
for (auto &b : *v) {
|
||||
for (const auto &b : *v) {
|
||||
if (test.empty()) {
|
||||
test = std::string("") + b;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user