From 3d2aebccad3652d207ac1592a1b105f7fe6a7496 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Thu, 4 Jan 2024 20:40:23 +0100
Subject: [PATCH] lib/upnp/Discovery: pass std::string_view to LockRemove()

---
 src/lib/upnp/Discovery.cxx | 2 +-
 src/lib/upnp/Discovery.hxx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/upnp/Discovery.cxx b/src/lib/upnp/Discovery.cxx
index eddd14487..f81ccd718 100644
--- a/src/lib/upnp/Discovery.cxx
+++ b/src/lib/upnp/Discovery.cxx
@@ -210,7 +210,7 @@ UPnPDeviceDirectory::LockAdd(ContentDirectoryDescriptor &&d) noexcept
 }
 
 inline void
-UPnPDeviceDirectory::LockRemove(const std::string &id) noexcept
+UPnPDeviceDirectory::LockRemove(const std::string_view id) noexcept
 {
 	const std::scoped_lock<Mutex> protect(mutex);
 
diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx
index 4393304d6..4d6ecc034 100644
--- a/src/lib/upnp/Discovery.hxx
+++ b/src/lib/upnp/Discovery.hxx
@@ -98,7 +98,7 @@ private:
 	void ExpireDevices() noexcept;
 
 	void LockAdd(ContentDirectoryDescriptor &&d) noexcept;
-	void LockRemove(const std::string &id) noexcept;
+	void LockRemove(std::string_view id) noexcept;
 
 	int OnAlive(const UpnpDiscovery *disco) noexcept;
 	int OnByeBye(const UpnpDiscovery *disco) noexcept;