> [email protected] wrote: > > [..] > >> {return int(Fl_Slider::value((double)p));} > > > > Wow, that's a lot of typing to say { return Fl_Slider::value(p); } > > I think the intention is to make it clear there's int->double > and double->int conversions going on there. (Fl_Scrollbar::value() > takes and returns an int, whereas Fl_Valuator takes/returns doubles) > > Pretty sure that int() is needed to lop off the mantissa from the > double return value to prevent the compiler from moaning about > "possible data loss".,
Nope, Fl_Valuator::value(double) returns an int, and int->double promotion of the argument is automatic. Clarity is in the eye of the beholder I suppose :) Cheers, Stan _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

