Skip to content
2 changes: 1 addition & 1 deletion src/engine/lua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ int Lua::getvars(lua_State *L) {
variables::Variable::stringMatchResolveMulti(t, varname, &l);

lua_newtable(L);
for (auto i : l) {
for (auto* i : l) {
lua_pushnumber(L, idx);
lua_newtable(L);

Expand Down
4 changes: 2 additions & 2 deletions src/rules_exceptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ bool RulesExceptions::contains(int a) {
}
}

for (auto z : m_ranges) {
for (auto& z : m_ranges) {
if (z.first <= a && z.second >= a) {
return true;
}
Expand All @@ -212,7 +212,7 @@ bool RulesExceptions::merge(RulesExceptions *from) {
return ret;
}
}
for (auto b : from->m_ranges) {
for (auto& b : from->m_ranges) {
bool ret = addRange(b.first, b.second);
if (ret == false) {
return ret;
Expand Down
4 changes: 2 additions & 2 deletions src/transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ std::string Transaction::toJSON(int parts) {
reinterpret_cast<const unsigned char*>("messages"),
strlen("messages"));
yajl_gen_array_open(g);
for (auto a : m_rulesMessages) {
for (auto& a : m_rulesMessages) {
yajl_gen_map_open(g);
LOGFY_ADD("message", a.m_message);
yajl_gen_string(g,
Expand All @@ -1721,7 +1721,7 @@ std::string Transaction::toJSON(int parts) {
reinterpret_cast<const unsigned char*>("tags"),
strlen("tags"));
yajl_gen_array_open(g);
for (auto b : a.m_tags) {
for (auto& b : a.m_tags) {
yajl_gen_string(g,
reinterpret_cast<const unsigned char*>(b.data()),
b.length());
Expand Down
Loading