From: Leandro Lucarella Date: Fri, 9 Nov 2007 17:23:03 +0000 (-0300) Subject: Don't do the reinterpret_cast trick anymore for the event wrapper. X-Git-Tag: 1.0~2 X-Git-Url: https://git.llucax.com/software/eventxx.git/commitdiff_plain/f0b79a21aae9407084223b4da15858cffe5ef601 Don't do the reinterpret_cast trick anymore for the event wrapper. --- diff --git a/eventxx b/eventxx index e54d279..1740a28 100644 --- 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 >