diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2023-05-12 18:10:08 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2023-05-12 19:07:07 +0300 |
commit | ad539545b8638d934f917e4d711fa7ef48011326 (patch) | |
tree | 8ab6181da11fd7a44c7a6a23bbdb6d6256224ce7 /include/ibm | |
parent | 65a176cdc66922b7d586e088c7ecf0602950ddcf (diff) | |
download | bmcweb-ad539545b8638d934f917e4d711fa7ef48011326.tar.xz |
use emplace where appropriate per clang-tidy
The clang-tidy warning 'modernize-use-emplace' correctly flags a
few places where emplace should be used over push.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6ca79285a87d6927e718345dc8dce0387e6b1eda
Diffstat (limited to 'include/ibm')
-rw-r--r-- | include/ibm/locks.hpp | 3 | ||||
-rw-r--r-- | include/ibm/management_console_rest.hpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp index 99b9cc3fba..f0e1612588 100644 --- a/include/ibm/locks.hpp +++ b/include/ibm/locks.hpp @@ -434,8 +434,7 @@ inline Rc Lock::isConflictWithTable(const LockRequests& refLockRequestStructure) // Lock table is empty, so we are safe to add the lockrecords // as there will be no conflict BMCWEB_LOG_DEBUG << "Lock table is empty, so adding the lockrecords"; - lockTable.emplace(std::pair<uint32_t, LockRequests>( - thisTransactionId, refLockRequestStructure)); + lockTable.emplace(thisTransactionId, refLockRequestStructure); return std::make_pair(false, thisTransactionId); } diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp index 51f5298b38..c2bf14af0c 100644 --- a/include/ibm/management_console_rest.hpp +++ b/include/ibm/management_console_rest.hpp @@ -450,10 +450,10 @@ inline void BMCWEB_LOG_DEBUG << "Lockflag : " << lockFlags; BMCWEB_LOG_DEBUG << "SegmentLength : " << segmentLength; - segInfo.push_back(std::make_pair(lockFlags, segmentLength)); + segInfo.emplace_back(std::make_pair(lockFlags, segmentLength)); } - lockRequestStructure.push_back(make_tuple( + lockRequestStructure.emplace_back(make_tuple( req.session->uniqueId, req.session->clientId.value_or(""), lockType, resourceId, segInfo)); } |