]> git.llucax.com Git - software/eventxx.git/commitdiff
Don't do the reinterpret_cast trick anymore for the event wrapper.
authorLeandro Lucarella <llucarella@integratech.com.ar>
Fri, 9 Nov 2007 17:23:03 +0000 (14:23 -0300)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Fri, 9 Nov 2007 17:23:03 +0000 (14:23 -0300)
eventxx

diff --git a/eventxx b/eventxx
index e54d27963ba09828418a7081435fd6431bea3418..1740a284919d120864319ce0600cbc3217115290 100644 (file)
--- a/eventxx
+++ b/eventxx
@@ -320,10 +320,7 @@ struct event: basic_event
                        F& handler = *reinterpret_cast< F* >(h);
                        // Hackish, but this way the handler can get a clean
                        // event type
-                       short* pev = &ev; // Avoid some weird warning about
-                                         // dereferencing type-punned pointer
-                                         // will break strict-aliasing rules
-                       handler(fd, *reinterpret_cast< type* >(pev));
+                       handler(fd, static_cast< type >(ev));
                }
 
 }; // struct event< F >