From b32ec857b141d0e11f310e04085d576026f0aff8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 24 Apr 2014 18:17:07 +0200 Subject: [PATCH] db/Helpers: use set::emplace() --- src/db/Helpers.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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: