aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-26 11:42:34 +0100
committerMax Kellermann <max@duempel.org>2014-01-06 18:21:45 +0100
commit0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad (patch)
tree221aaaa6f4df1d0b502c9523bf05c19cb6c03fd5 /src/tag
parent617090cfdaf6acfdef7f2de6cd521559d07d311e (diff)
downloadmpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.tar.gz
mpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.tar.xz
mpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.zip
util/Cast: new utility library
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/TagPool.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tag/TagPool.cxx b/src/tag/TagPool.cxx
index cc28ea9a6..8e1e670c9 100644
--- a/src/tag/TagPool.cxx
+++ b/src/tag/TagPool.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "TagPool.hxx"
#include "TagItem.hxx"
+#include "util/Cast.hxx"
#include <glib.h>
@@ -67,7 +68,7 @@ calc_hash(TagType type, const char *p)
static inline struct slot *
tag_item_to_slot(TagItem *item)
{
- return (struct slot*)(((char*)item) - offsetof(struct slot, item));
+ return ContainerCast(item, slot, item);
}
static struct slot *slot_alloc(struct slot *next,