diff options
author | Max Kellermann <max@duempel.org> | 2013-12-26 11:42:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-06 18:21:45 +0100 |
commit | 0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad (patch) | |
tree | 221aaaa6f4df1d0b502c9523bf05c19cb6c03fd5 /src/output | |
parent | 617090cfdaf6acfdef7f2de6cd521559d07d311e (diff) | |
download | mpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.tar.gz mpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.tar.xz mpd-0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad.zip |
util/Cast: new utility library
Diffstat (limited to '')
-rw-r--r-- | src/output/HttpdInternal.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/HttpdInternal.hxx b/src/output/HttpdInternal.hxx index 5a9ef8c19..8d35d35e9 100644 --- a/src/output/HttpdInternal.hxx +++ b/src/output/HttpdInternal.hxx @@ -30,6 +30,7 @@ #include "thread/Mutex.hxx" #include "event/ServerSocket.hxx" #include "event/DeferredMonitor.hxx" +#include "util/Cast.hxx" #ifdef _LIBCPP_VERSION /* can't use incomplete template arguments with libc++ */ @@ -157,7 +158,7 @@ public: #endif static constexpr HttpdOutput *Cast(audio_output *ao) { - return (HttpdOutput *)((char *)ao - offsetof(HttpdOutput, base)); + return ContainerCast(ao, HttpdOutput, base); } #if GCC_CHECK_VERSION(4,6) || defined(__clang__) |