mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
const-ify some references (satisfy cppcheck)
This commit is contained in:
@@ -47,7 +47,7 @@ class AnchoredSetVariableTranslationProxy {
|
||||
VariableValue *newVariableValue = new VariableValue(name, &l->at(i)->getKey(), &l->at(i)->getKey());
|
||||
const VariableValue *oldVariableValue = l->at(i);
|
||||
l->at(i) = newVariableValue;
|
||||
for (auto &oldOrigin : oldVariableValue->getOrigin()) {
|
||||
for (const auto &oldOrigin : oldVariableValue->getOrigin()) {
|
||||
std::unique_ptr<VariableOrigin> newOrigin(new VariableOrigin);
|
||||
newOrigin->m_length = oldVariableValue->getKey().size();
|
||||
newOrigin->m_offset = oldOrigin->m_offset - oldVariableValue->getKey().size() - 1;
|
||||
|
@@ -62,7 +62,7 @@ class VariableValue {
|
||||
m_keyWithCollection(o->m_keyWithCollection),
|
||||
m_value(o->m_value)
|
||||
{
|
||||
for (auto &i : o->m_orign) {
|
||||
for (const auto &i : o->m_orign) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
origin->m_offset = i->m_offset;
|
||||
origin->m_length = i->m_length;
|
||||
|
Reference in New Issue
Block a user