summaryrefslogtreecommitdiff
path: root/include/ibm
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-25 21:19:23 +0300
committerEd Tanous <ed@tanous.net>2022-02-09 23:45:00 +0300
commit9eb808c1a84a76e92b0e01fa95d3f160f38d7c3f (patch)
treef3631a3f2a97fb0f048fb1dd5d295b867e8d37fc /include/ibm
parentb3db89663256a462e9c90bf260d5058014765137 (diff)
downloadbmcweb-9eb808c1a84a76e92b0e01fa95d3f160f38d7c3f.tar.xz
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
Diffstat (limited to 'include/ibm')
-rw-r--r--include/ibm/locks.hpp2
-rw-r--r--include/ibm/management_console_rest.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index 10f0a9a66b..b39bada519 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -245,7 +245,7 @@ inline RcAcquireLock Lock::acquireLock(const LockRequests& lockRequestStructure)
// 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 876ceb3d18..e80e727210 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -85,7 +85,7 @@ inline void handleFilePut(const crow::Request& req,
return;
}
std::uintmax_t saveAreaDirSize = 0;
- for (auto& it : iter)
+ for (const auto& it : iter)
{
if (!std::filesystem::is_directory(it, ec))
{