Enable readability-avoid-const-params-in-decls
This check involves explicitly declaring variables const when they're
declared auto, which helps in readability, and makes it more clear that
the variables are const.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I71198ea03850384a389a56ad26f2c4a48c75b148
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 34f6770..23e3ead 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -952,7 +952,7 @@
}
nlohmann::json& links =
asyncResp->res.jsonValue["Links"]["Certificates"];
- for (auto& cert : certs)
+ for (const auto& cert : certs)
{
long id = getIDFromURL(cert.first.str);
if (id >= 0)