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/include/ibm/locks.hpp b/include/ibm/locks.hpp
index 10f0a9a..b39bada 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -245,7 +245,7 @@
// validate the lock request
- for (auto& lockRecord : lockRequestStructure)
+ for (const auto& lockRecord : lockRequestStructure)
{
bool status = isValidLockRequest(lockRecord);
if (!status)
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 876ceb3..e80e727 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -85,7 +85,7 @@
return;
}
std::uintmax_t saveAreaDirSize = 0;
- for (auto& it : iter)
+ for (const auto& it : iter)
{
if (!std::filesystem::is_directory(it, ec))
{