Fix large copies with url_view and segments_view
Despite these objects being called "view" they are still relatively
large, as clang-tidy correctly flags, and we ignore.
Change all function uses to capture by:
const boost::urls::url_view_base&
Which is the base class of all boost URL types, and any class (url,
url_view, etc) is convertible to that base.
Change-Id: I8ee2ea3f4cfba38331303a7e4eb520a2b6f8ba92
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index b03f323..529b9dc 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -28,6 +28,7 @@
#include <boost/process/async_pipe.hpp>
#include <boost/url/format.hpp>
#include <boost/url/url_view.hpp>
+#include <boost/url/url_view_base.hpp>
#include <array>
#include <ranges>
@@ -367,7 +368,7 @@
*
*/
inline std::optional<TransferProtocol>
- getTransferProtocolFromUri(boost::urls::url_view imageUri)
+ getTransferProtocolFromUri(const boost::urls::url_view_base& imageUri)
{
std::string_view scheme = imageUri.scheme();
if (scheme == "smb")