modernize ibm management console

There was some modernization problems in the IBM console.  These are all
minor, and unlikely to cause problems.  The issues were:
1. Trivial destructors need to use the = default syntax
2. Several loops can be simplified into range based for loops
3. push_back should not be paired with make_pair.  emplace_back should
be used instead.

Change-Id: I71b1d5437249d896a6f95c211e176deb676f985d
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);
             }