[AD] event source casts

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Here's a proposal to fix this bug:
https://sourceforge.net/tracker/?func=detail&aid=2329841&group_id=5665&atid=105665

The idea is to add the following functions:

ALLEGRO_EVENT_SOURCE *al_get_stream_event_source(ALLEGRO_STREAM *)

That's the one directly fixing the ugly cast. And further:

ALLEGRO_EVENT_SOURCE *al_get_display_event_source(ALLEGRO_DISPLAY *)
ALLEGRO_EVENT_SOURCE *al_get_keyboard_event_source(ALLEGRO_KEYBOARD *)
ALLEGRO_EVENT_SOURCE *al_get_mouse_event_source(ALLEGRO_MOUSE *)
ALLEGRO_EVENT_SOURCE *al_get_timer_event_source(ALLEGRO_TIMER *)
ALLEGRO_EVENT_SOURCE *al_get_joystick_event_source(ALLEGRO_JOYSTICK *)

Which fixes a few more (not quite as ugly) casts. Any thoughts?

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/