mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-04 08:04:49 +00:00
fix(c++): improve const correctness
Reported by cppcheck Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user