aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/plugins
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/output/plugins
parentf8da8b02615bc5b8a358407da147c97debc40e06 (diff)
downloadmpd-7a1f3177c92556c4ca224d28fc881686845c5052.tar.gz
mpd-7a1f3177c92556c4ca224d28fc881686845c5052.tar.xz
mpd-7a1f3177c92556c4ca224d28fc881686845c5052.zip
util/Cast: reimplement as template without macro
Diffstat (limited to 'src/output/plugins')
-rw-r--r--src/output/plugins/httpd/HttpdInternal.hxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/output/plugins/httpd/HttpdInternal.hxx b/src/output/plugins/httpd/HttpdInternal.hxx
index a16c60bc3..5c113520d 100644
--- a/src/output/plugins/httpd/HttpdInternal.hxx
+++ b/src/output/plugins/httpd/HttpdInternal.hxx
@@ -152,19 +152,13 @@ public:
HttpdOutput(EventLoop &_loop);
~HttpdOutput();
-#if GCC_CHECK_VERSION(4,6) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+#if defined(__clang__) || GCC_CHECK_VERSION(4,7)
+ constexpr
#endif
-
- static constexpr HttpdOutput *Cast(AudioOutput *ao) {
- return ContainerCast(ao, HttpdOutput, base);
+ static HttpdOutput *Cast(AudioOutput *ao) {
+ return &ContainerCast(*ao, &HttpdOutput::base);
}
-#if GCC_CHECK_VERSION(4,6) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
using DeferredMonitor::GetEventLoop;
bool Init(const config_param &param, Error &error);