From 9ccc63b4aa2df14c9ea0e06892b2cf0158133119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 2 Jul 2013 02:04:52 +0200 Subject: [PATCH] Math: fixed strict aliasing warning. Is there _any_ use case of reinterpret_cast where GCC won't loudly complain? --- src/Math/Geometry/Rectangle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Math/Geometry/Rectangle.h b/src/Math/Geometry/Rectangle.h index 41c3a4efc..21f3bb331 100644 --- a/src/Math/Geometry/Rectangle.h +++ b/src/Math/Geometry/Rectangle.h @@ -163,7 +163,7 @@ template struct ConfigurationValue /** @brief Reads elements separated with whitespace */ static Magnum::Math::Geometry::Rectangle fromString(const std::string& stringValue, const ConfigurationValueFlags flags) { const auto vec = ConfigurationValue>::fromString(stringValue, flags); - return reinterpret_cast&>(vec); + return {{vec[0], vec[1]}, {vec[2], vec[3]}}; } };