summaryrefslogtreecommitdiff
path: root/include/sessions.hpp
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-09-28 14:48:07 +0300
committerEd Tanous <ed@tanous.net>2022-09-28 19:30:01 +0300
commit41713dd7a72743affa0c7ff28c00680f7eb36489 (patch)
treecd05f3283868c7a4912c137232b66bf0b29f72b3 /include/sessions.hpp
parentc106b67aaad9cfdc34a24addb8e62b66522ae831 (diff)
downloadbmcweb-41713dd7a72743affa0c7ff28c00680f7eb36489.tar.xz
clang-15: fixes for emplace
clang-tidy-15 is raising the following warning, which it automatically fixed: ``` ../include/sessions.hpp:262:38: error: unnecessary temporary object created while calling emplace [modernize-use-emplace,-warnings-as-errors] auto it = authTokens.emplace(std::make_pair(sessionToken, session)); ^~~~~~~~~~~~~~~ ~ ``` Apply automatically generated fix. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I425efdcba4bf08b03d64f8fb913eab956f5a198d
Diffstat (limited to 'include/sessions.hpp')
-rw-r--r--include/sessions.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 3dabff4b5d..79b344ae4d 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -259,7 +259,7 @@ class SessionStore
std::string(clientId), redfish::ip_util::toString(clientIp),
std::chrono::steady_clock::now(), persistence, false,
isConfigureSelfOnly});
- auto it = authTokens.emplace(std::make_pair(sessionToken, session));
+ auto it = authTokens.emplace(sessionToken, session);
// Only need to write to disk if session isn't about to be destroyed.
needWrite = persistence == PersistenceType::TIMEOUT;
return it.first->second;