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/http_utility.hpp b/include/http_utility.hpp
index 0f5bb8c..e2b1a11 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -5,7 +5,7 @@
{
inline bool requestPrefersHtml(const crow::Request& req)
{
- boost::string_view header = req.getHeaderValue("accept");
+ std::string_view header = req.getHeaderValue("accept");
std::vector<std::string> encodings;
// chrome currently sends 6 accepts headers, firefox sends 4.
encodings.reserve(6);
@@ -25,7 +25,7 @@
return false;
}
-inline std::string urlEncode(const boost::string_view value)
+inline std::string urlEncode(const std::string_view value)
{
std::ostringstream escaped;
escaped.fill('0');