diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index 162abee..e986f32 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -188,8 +188,7 @@
         return lockObject;
     }
 
-    virtual ~Lock()
-    {}
+    virtual ~Lock() = default;
 };
 
 inline bool Lock::createPersistentLockFilePath()
@@ -293,7 +292,7 @@
 
                     // Push the whole lock record into a vector for returning
                     // the json
-                    lockList.push_back(std::make_pair(it->first, it->second));
+                    lockList.emplace_back(it->first, it->second);
                 }
                 // Go to next entry in map
                 it++;
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index c318cc6..2c45693 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -373,14 +373,14 @@
 
     // print lock request into journal
 
-    for (uint32_t i = 0; i < lockRequestStructure.size(); i++)
+    for (auto& i : lockRequestStructure)
     {
-        BMCWEB_LOG_DEBUG << std::get<0>(lockRequestStructure[i]);
-        BMCWEB_LOG_DEBUG << std::get<1>(lockRequestStructure[i]);
-        BMCWEB_LOG_DEBUG << std::get<2>(lockRequestStructure[i]);
-        BMCWEB_LOG_DEBUG << std::get<3>(lockRequestStructure[i]);
+        BMCWEB_LOG_DEBUG << std::get<0>(i);
+        BMCWEB_LOG_DEBUG << std::get<1>(i);
+        BMCWEB_LOG_DEBUG << std::get<2>(i);
+        BMCWEB_LOG_DEBUG << std::get<3>(i);
 
-        for (const auto& p : std::get<4>(lockRequestStructure[i]))
+        for (const auto& p : std::get<4>(i))
         {
             BMCWEB_LOG_DEBUG << p.first << ", " << p.second;
         }
@@ -443,10 +443,10 @@
             returnJson["LockType"] = std::get<2>(var.second);
             returnJson["ResourceID"] = std::get<3>(var.second);
 
-            for (uint32_t i = 0; i < std::get<4>(var.second).size(); i++)
+            for (auto& i : std::get<4>(var.second))
             {
-                segments["LockFlag"] = std::get<4>(var.second)[i].first;
-                segments["SegmentLength"] = std::get<4>(var.second)[i].second;
+                segments["LockFlag"] = i.first;
+                segments["SegmentLength"] = i.second;
                 myarray.push_back(segments);
             }
 
@@ -472,9 +472,9 @@
 {
     BMCWEB_LOG_DEBUG << listTransactionIds.size();
     BMCWEB_LOG_DEBUG << "Data is present";
-    for (uint32_t i = 0; i < listTransactionIds.size(); i++)
+    for (unsigned int listTransactionId : listTransactionIds)
     {
-        BMCWEB_LOG_DEBUG << listTransactionIds[i];
+        BMCWEB_LOG_DEBUG << listTransactionId;
     }
 
     // validate the request ids
@@ -518,10 +518,10 @@
             returnJson["LockType"] = std::get<2>(var.second);
             returnJson["ResourceID"] = std::get<3>(var.second);
 
-            for (uint32_t i = 0; i < std::get<4>(var.second).size(); i++)
+            for (auto& i : std::get<4>(var.second))
             {
-                segments["LockFlag"] = std::get<4>(var.second)[i].first;
-                segments["SegmentLength"] = std::get<4>(var.second)[i].second;
+                segments["LockFlag"] = i.first;
+                segments["SegmentLength"] = i.second;
                 myArray.push_back(segments);
             }
 
