diff --git a/src/lib/upnp/Device.cxx b/src/lib/upnp/Device.cxx index b45e50762..3221642fd 100644 --- a/src/lib/upnp/Device.cxx +++ b/src/lib/upnp/Device.cxx @@ -79,7 +79,7 @@ protected: }; void -UPnPDevice::Parse(const std::string &url, const char *description) +UPnPDevice::Parse(const std::string_view url, const char *description) { { UPnPDeviceParser mparser(*this); diff --git a/src/lib/upnp/Device.hxx b/src/lib/upnp/Device.hxx index 2488a41af..d0f739701 100644 --- a/src/lib/upnp/Device.hxx +++ b/src/lib/upnp/Device.hxx @@ -1,8 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later // Copyright The Music Player Daemon Project -#ifndef _UPNPDEV_HXX_INCLUDED_ -#define _UPNPDEV_HXX_INCLUDED_ +#pragma once #include #include @@ -57,7 +56,5 @@ public: * @param url where the description came from * @param description the xml device description */ - void Parse(const std::string &url, const char *description); + void Parse(std::string_view url, const char *description); }; - -#endif /* _UPNPDEV_HXX_INCLUDED_ */ diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx index 2b106f51c..9fcaf4b2d 100644 --- a/src/lib/upnp/Discovery.hxx +++ b/src/lib/upnp/Discovery.hxx @@ -55,7 +55,7 @@ class UPnPDeviceDirectory final : UpnpCallback { :id(std::move(_id)), expires(last + exp + std::chrono::seconds(20)) {} - void Parse(const std::string &url, const char *description) { + void Parse(std::string_view url, const char *description) { device.Parse(url, description); } };