aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/UpnpDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-13 21:35:14 +0100
committerMax Kellermann <max@duempel.org>2014-01-13 22:24:48 +0100
commita4d580a6f87422798ba979d798115daca2649f81 (patch)
tree3cb0d44e99298e643079b4d9cf6140fbbe43261f /src/db/UpnpDatabasePlugin.cxx
parentca43e634b5adfebdcb9c3c8f61cebf38d42827e0 (diff)
downloadmpd-a4d580a6f87422798ba979d798115daca2649f81.tar.gz
mpd-a4d580a6f87422798ba979d798115daca2649f81.tar.xz
mpd-a4d580a6f87422798ba979d798115daca2649f81.zip
db/upnp: add fallback for emplace()
The method emplace() was added in gcc 4.8. This commit restores compatibility with gcc 4.7.
Diffstat (limited to 'src/db/UpnpDatabasePlugin.cxx')
-rw-r--r--src/db/UpnpDatabasePlugin.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx
index 68a24cb4f..78171562e 100644
--- a/src/db/UpnpDatabasePlugin.cxx
+++ b/src/db/UpnpDatabasePlugin.cxx
@@ -829,8 +829,13 @@ UpnpDatabase::VisitUniqueTags(const DatabaseSelection &selection,
for (auto &dirent : dirbuf.m_items) {
std::string tagvalue;
- if (getTagValue(dirent, tag, tagvalue))
+ if (getTagValue(dirent, tag, tagvalue)) {
+#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
values.emplace(std::move(tagvalue));
+#else
+ values.insert(std::move(tagvalue));
+#endif
+ }
}
}