lib/upnp/Device: pass url as std::string_view to Parse()
This commit is contained in:
parent
d5f7db59a8
commit
4c9942534c
|
@ -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);
|
||||
|
|
|
@ -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 <vector>
|
||||
#include <string>
|
||||
|
@ -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_ */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue