diff options
author | Max Kellermann <max@duempel.org> | 2014-12-09 23:10:05 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-09 23:10:05 +0100 |
commit | dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562 (patch) | |
tree | 7f8773ce2c53f25a54c9f550b0a7dd2d23abb3e7 /src/util | |
parent | 18891500132442db3a7eecca95468b83886d12b8 (diff) | |
download | mpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.tar.gz mpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.tar.xz mpd-dbbcbc36161cd6a4396c5b17d3edc96f4e9b9562.zip |
Util/Manual: cast via void* to avoid alignment warnings
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Manual.hxx | 6 |
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 &() { |