On 13.01.2011 16:31, Greg Ercolano wrote: > Albrecht Schlosser wrote: >> Wouldn't it be better to use (Fl_Widget *) or maybe better yet >> (Fl_Text_Display *)? > > I decided on void* cause I was torn which of the two to choose, > and being a maverick, I thought: neither! ;) > > But yes, probably Fl_Widget* would be the right one to keep > both sides of the equality balanced.
Balanced, yes, but then we have an explicit cast for 'this' that is not obvious (of course it is okay, because Fl_Text_Display is a Fl_Widget). If we used Fl_Text_Display*, this would only cast the 'const' away, and the further cast to Fl_Widget* for comparison would be done by the compiler, and this would be type-safe. Might be nit-picking, but I'd prefer the latter. But I don't like either - for me this should simply work. Should we put it in "#if _MSC_VER <= NNNN" with NNNN = VC6-version-no. ? ;-) Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

