aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/db/upnp/Device.hxx4
-rw-r--r--src/db/upnp/Discovery.cxx8
-rw-r--r--src/db/upnp/Discovery.hxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/db/upnp/Device.hxx b/src/db/upnp/Device.hxx
index 78b9820f9..78be01bd5 100644
--- a/src/db/upnp/Device.hxx
+++ b/src/db/upnp/Device.hxx
@@ -85,6 +85,10 @@ public:
UPnPDevice(const std::string &url, const char *description);
UPnPDevice() : ok(false) {}
+
+ UPnPDevice(const UPnPDevice &) = delete;
+ UPnPDevice(UPnPDevice &&) = default;
+ UPnPDevice &operator=(UPnPDevice &&) = default;
};
#endif /* _UPNPDEV_HXX_INCLUDED_ */
diff --git a/src/db/upnp/Discovery.cxx b/src/db/upnp/Discovery.cxx
index 98bc8ddb2..b5c6b5f92 100644
--- a/src/db/upnp/Discovery.cxx
+++ b/src/db/upnp/Discovery.cxx
@@ -82,13 +82,7 @@ UPnPDeviceDirectory::discoExplorer()
}
const ScopeLock protect(mutex);
-#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
- auto e = directories.emplace(tsk->deviceId, d);
-#else
- auto e = directories.insert(std::make_pair(tsk->deviceId, d));
-#endif
- if (!e.second)
- e.first->second = d;
+ directories[std::move(tsk->deviceId)] = std::move(d);
delete tsk;
}
diff --git a/src/db/upnp/Discovery.hxx b/src/db/upnp/Discovery.hxx
index 0ac731329..1f24135b2 100644
--- a/src/db/upnp/Discovery.hxx
+++ b/src/db/upnp/Discovery.hxx
@@ -65,6 +65,8 @@ class UPnPDeviceDirectory {
*/
class ContentDirectoryDescriptor {
public:
+ ContentDirectoryDescriptor() = default;
+
ContentDirectoryDescriptor(const std::string &url,
const char *description,
time_t last, int exp)