fix(c++): improve const correctness

Reported by cppcheck

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
Samuel Gaist
2024-02-13 23:07:38 +01:00
committed by poiana
parent 792bcdca18
commit 5e497a4119
37 changed files with 92 additions and 92 deletions

View File

@@ -140,7 +140,7 @@ std::string rule_loader::context::as_string()
bool first = true;
for(auto& loc : m_locs)
for(const auto& loc : m_locs)
{
os << (first ? "In " : " ");
first = false;
@@ -174,7 +174,7 @@ nlohmann::json rule_loader::context::as_json()
throw falco_exception("rule_loader::context without location?");
}
for(auto& loc : m_locs)
for(const auto& loc : m_locs)
{
nlohmann::json jloc, jpos;