]> git.llucax.com Git - software/eventxx.git/commitdiff
Don't do the reinterpret_cast trick anymore for type's operator|.
authorLeandro Lucarella <llucarella@integratech.com.ar>
Fri, 9 Nov 2007 16:30:17 +0000 (13:30 -0300)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Fri, 9 Nov 2007 16:30:17 +0000 (13:30 -0300)
eventxx

diff --git a/eventxx b/eventxx
index 7b4d950d087255d735fb7a550f32d8b0a8fd0d21..e54d27963ba09828418a7081435fd6431bea3418 100644 (file)
--- a/eventxx
+++ b/eventxx
@@ -201,9 +201,7 @@ inline
 type operator| (const type& t1, const type& t2)
 {
        int r = static_cast< int >(t1) | static_cast< int >(t2);
-       int* pr = &r; // Avoid some weird warning about dereferencing
-                     // type-punned pointer will break strict-aliasing rules
-       return *reinterpret_cast< type* >(pr);
+       return static_cast< type >(r);
 }