const-ify some references (satisfy cppcheck)

This commit is contained in:
Martin Vierula
2023-10-27 06:20:01 -07:00
parent b9836bcaa4
commit 36adc58ea3
11 changed files with 14 additions and 14 deletions

View File

@@ -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;

View File

@@ -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 {