aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-14 16:24:07 +0200
committerMax Kellermann <max@duempel.org>2014-07-14 16:24:07 +0200
commit7a1f3177c92556c4ca224d28fc881686845c5052 (patch)
tree158b962f07f6877ad33ebd6e590475fb6c0d6833 /src/tag
parentf8da8b02615bc5b8a358407da147c97debc40e06 (diff)
downloadmpd-7a1f3177c92556c4ca224d28fc881686845c5052.tar.gz
mpd-7a1f3177c92556c4ca224d28fc881686845c5052.tar.xz
mpd-7a1f3177c92556c4ca224d28fc881686845c5052.zip
util/Cast: reimplement as template without macro
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/TagPool.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tag/TagPool.cxx b/src/tag/TagPool.cxx
index 0b6bc956c..29f605337 100644
--- a/src/tag/TagPool.cxx
+++ b/src/tag/TagPool.cxx
@@ -87,10 +87,13 @@ calc_hash(TagType type, const char *p)
return hash ^ type;
}
-static inline constexpr TagPoolSlot *
+#if defined(__clang__) || GCC_CHECK_VERSION(4,7)
+ constexpr
+#endif
+static inline TagPoolSlot *
tag_item_to_slot(TagItem *item)
{
- return ContainerCast(item, TagPoolSlot, item);
+ return &ContainerCast(*item, &TagPoolSlot::item);
}
static inline TagPoolSlot **