aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-24 18:17:07 +0200
committerMax Kellermann <max@duempel.org>2014-04-24 18:17:07 +0200
commitb32ec857b141d0e11f310e04085d576026f0aff8 (patch)
treed7cb7b2b4602077f7b48b9c4c99f6f00c4de788e /src/db
parent0de42d56fc000eca07ee6c9cc750d391be994397 (diff)
downloadmpd-b32ec857b141d0e11f310e04085d576026f0aff8.tar.gz
mpd-b32ec857b141d0e11f310e04085d576026f0aff8.tar.xz
mpd-b32ec857b141d0e11f310e04085d576026f0aff8.zip
db/Helpers: use set::emplace()
Diffstat (limited to 'src/db')
-rw-r--r--src/db/Helpers.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/db/Helpers.cxx b/src/db/Helpers.cxx
index 6259d4f40..9a68e0486 100644
--- a/src/db/Helpers.cxx
+++ b/src/db/Helpers.cxx
@@ -194,11 +194,19 @@ StatsVisitTag(DatabaseStats &stats, StringSet &artists, StringSet &albums,
switch (item.type) {
case TAG_ARTIST:
+#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
+ artists.emplace(item.value);
+#else
artists.insert(item.value);
+#endif
break;
case TAG_ALBUM:
+#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
+ albums.emplace(item.value);
+#else
albums.insert(item.value);
+#endif
break;
default: