aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/Manual.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-09 23:10:05 +0100
committerMax Kellermann <max@duempel.org>2014-12-09 23:10:05 +0100
commitdbbcbc36161cd6a4396c5b17d3edc96f4e9b9562 (patch)
tree7f8773ce2c53f25a54c9f550b0a7dd2d23abb3e7 /src/util/Manual.hxx
parent18891500132442db3a7eecca95468b83886d12b8 (diff)
downloadmpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.tar.gz
mpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.tar.xz
mpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.zip
Util/Manual: cast via void* to avoid alignment warnings
Diffstat (limited to 'src/util/Manual.hxx')
-rw-r--r--src/util/Manual.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx
index 6f080ff29..6ba932bdd 100644
--- a/src/util/Manual.hxx
+++ b/src/util/Manual.hxx
@@ -95,13 +95,15 @@ public:
T &Get() {
assert(initialized);
- return *(T *)data;
+ void *p = static_cast<void *>(data);
+ return *static_cast<T *>(p);
}
const T &Get() const {
assert(initialized);
- return *(const T *)data;
+ const void *p = static_cast<const void *>(data);
+ return *static_cast<const T *>(p);
}
operator T &() {