bmcweb: /s/boost::string_view/std::string_view/g
With boost 1.69, we get the new option, BOOST_BEAST_USE_STD_STRING_VIEW
which allows us to use std::string for all beast interfaces, instead of
boost string_view. This was originally intended to try to reduce the
binary size, but the comparison shows only a minor improvement.
boost::string_view: 7420780 bytes
std::string_view: 7419948 bytes
832 bytes saved ! ! ! ! !
So instead, we will use the argument that it's more standard and easier
for people to grok.
Tested By:
Pulled down some bmcweb endpoints, and observed no change. Because the
two objects are essentially drop in replacements for one another, there
should be no change.
Change-Id: I001e8cf2a0124de4792a7154bf246e3c35ef3f97
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 510f566..6bc1c99 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -102,7 +102,7 @@
{
public:
std::shared_ptr<UserSession> generateUserSession(
- const boost::string_view username,
+ const std::string_view username,
PersistenceType persistence = PersistenceType::TIMEOUT)
{
// TODO(ed) find a secure way to not generate session identifiers if
@@ -148,7 +148,7 @@
}
std::shared_ptr<UserSession>
- loginSessionByToken(const boost::string_view token)
+ loginSessionByToken(const std::string_view token)
{
applySessionTimeouts();
auto sessionIt = authTokens.find(std::string(token));
@@ -161,7 +161,7 @@
return userSession;
}
- std::shared_ptr<UserSession> getSessionByUid(const boost::string_view uid)
+ std::shared_ptr<UserSession> getSessionByUid(const std::string_view uid)
{
applySessionTimeouts();
// TODO(Ed) this is inefficient