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/include/privileges.hpp b/redfish-core/include/privileges.hpp
index f5bc8b6..160816f 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -260,7 +260,7 @@
{
return true;
}
- for (auto& requiredPrivileges : operationPrivilegesRequired)
+ for (const auto& requiredPrivileges : operationPrivilegesRequired)
{
BMCWEB_LOG_DEBUG << "Checking operation privileges...";
if (userPrivileges.isSupersetOf(requiredPrivileges))